NodeComponent
A component that provides its Entity
with an SKNode
.
-
This function is implemented for
SwiftConfig.IConfigBuildable
conformance.Declaration
Swift
public class func build(#config:Config) -> Result<NodeComponent>
-
The unique ID of this component’s system.
Declaration
Swift
public let systemID: Systems = .Node
-
The unique ID of the entity to which this component belongs.
Declaration
Swift
public var entityID: Entity.EntityID
-
The
SKNode
that this component provides to itsEntity
.Declaration
Swift
public var node = SKNode()
-
If
true
, this component will update theEntity
’sPositionComponent
any timenode
’s position changes.Declaration
Swift
public var shouldUpdatePositionComponent: Bool
-
The designated initializer.
Declaration
Swift
public init(entityID eid:Entity.EntityID, shouldUpdatePositionComponent update:Bool = true)