pub unsafe trait SKNodeGameplayKit:
ClassType
+ Sized
+ Sealed {
// Provided methods
unsafe fn obstaclesFromSpriteTextures_accuracy(
sprites: &NSArray<SKNode>,
accuracy: c_float,
mtm: MainThreadMarker,
) -> Retained<NSArray<GKPolygonObstacle>> { ... }
unsafe fn obstaclesFromNodeBounds(
nodes: &NSArray<SKNode>,
mtm: MainThreadMarker,
) -> Retained<NSArray<GKPolygonObstacle>> { ... }
unsafe fn obstaclesFromNodePhysicsBodies(
nodes: &NSArray<SKNode>,
mtm: MainThreadMarker,
) -> Retained<NSArray<GKPolygonObstacle>> { ... }
unsafe fn entity(&self) -> Option<Retained<GKEntity>> { ... }
unsafe fn setEntity(&self, entity: Option<&GKEntity>) { ... }
}Available on crate feature
SpriteKit_Additions only.Expand description
Category “GameplayKit” on SKNode.
Provided Methods§
Sourceunsafe fn obstaclesFromSpriteTextures_accuracy(
sprites: &NSArray<SKNode>,
accuracy: c_float,
mtm: MainThreadMarker,
) -> Retained<NSArray<GKPolygonObstacle>>
Available on crate feature GKObstacle and crate feature objc2-sprite-kit and macOS only.
unsafe fn obstaclesFromSpriteTextures_accuracy( sprites: &NSArray<SKNode>, accuracy: c_float, mtm: MainThreadMarker, ) -> Retained<NSArray<GKPolygonObstacle>>
GKObstacle and crate feature objc2-sprite-kit and macOS only.Returns an array of GKPolygonObstacles from a group of SKSpriteNode’s textures in scene space.
See: GKObstacleGraph
Sourceunsafe fn obstaclesFromNodeBounds(
nodes: &NSArray<SKNode>,
mtm: MainThreadMarker,
) -> Retained<NSArray<GKPolygonObstacle>>
Available on crate feature GKObstacle and crate feature objc2-sprite-kit and macOS only.
unsafe fn obstaclesFromNodeBounds( nodes: &NSArray<SKNode>, mtm: MainThreadMarker, ) -> Retained<NSArray<GKPolygonObstacle>>
GKObstacle and crate feature objc2-sprite-kit and macOS only.Returns an array of GKPolygonObstacles from a group of SKNode’s transformed bounds in scene space.
See: GKObstacleGraph
Sourceunsafe fn obstaclesFromNodePhysicsBodies(
nodes: &NSArray<SKNode>,
mtm: MainThreadMarker,
) -> Retained<NSArray<GKPolygonObstacle>>
Available on crate feature GKObstacle and crate feature objc2-sprite-kit and macOS only.
unsafe fn obstaclesFromNodePhysicsBodies( nodes: &NSArray<SKNode>, mtm: MainThreadMarker, ) -> Retained<NSArray<GKPolygonObstacle>>
GKObstacle and crate feature objc2-sprite-kit and macOS only.Returns an array of GKPolygonObstacles from a group of SKNode’s physics bodies in scene space.
See: GKObstacleGraph
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
impl SKNodeGameplayKit for SKNode
Available on crate feature
objc2-sprite-kit and macOS only.