SpriteComponent
A component providing its Entity
with an SKSpriteNode
. The sprite node is automatically added to the Entity
’s SKNode
(which it acquires from NodeComponent
).Required components: NodeComponent
-
This function is implemented for
SwiftConfig.IConfigBuildable
conformance.Declaration
Swift
public class func build(#config:Config) -> Result<SpriteComponent>
-
The unique ID of this component’s system.
Declaration
Swift
public let systemID: Systems = .Sprite
-
The unique ID of the entity to which this component belongs.
Declaration
Swift
public var entityID: Entity.EntityID
-
The
SKSpriteNode
that this component provides to itsEntity
.Declaration
Swift
public var spriteNode: SKSpriteNode
-
The designated initializer.
Declaration
Swift
public init(entityID eid:Entity.EntityID, spriteNode sn:SKSpriteNode)