| Package | PBLabs.Rendering2D |
| Class | public class SimpleSpatialComponent |
| Inheritance | SimpleSpatialComponent TickedComponent EntityComponent |
| Implements | ISpatialObject2D |
| Subclasses | Interpolated2DMoverComponent |
| Property | Defined by | ||
|---|---|---|---|
![]() | IsRegistered : Boolean
Whether or not the component is currently registered with an entity.
| EntityComponent | |
![]() | Name : String
The name given to the component when it is added to an entity.
| EntityComponent | |
| ObjectMask : ObjectType
This object's collision flags.
| SimpleSpatialComponent | ||
![]() | Owner : IEntity
A reference to the entity that this component currently belongs to.
| EntityComponent | |
| Position : Point
The position of the object.
| SimpleSpatialComponent | ||
![]() | RegisterForTicks : Boolean = true
Do we actually want to register for ticks? Useful if a subclass wants
to disable the functionality.
| TickedComponent | |
| Rotation : Number = 0
The rotation of the object.
| SimpleSpatialComponent | ||
| Size : Point
The size of the object.
| SimpleSpatialComponent | ||
| SpatialManager : ISpatialManager2D
The spatial manager this object belongs to.
| SimpleSpatialComponent | ||
![]() | UpdatePriority : Number = 0.0
The update priority for this component.
| TickedComponent | |
| Velocity : Point
The linear velocity of the object in world units per second.
| SimpleSpatialComponent | ||
| WorldExtents : Rectangle [read-only]
Axis aligned object bounds in world space.
| SimpleSpatialComponent | ||
| Method | Defined by | ||
|---|---|---|---|
|
Not currently implemented.
| SimpleSpatialComponent | ||
![]() |
OnInterpolateTick(factor:Number):void
This method is called every frame by the ProcessManager on any objects
that have been added to it with the AddTickedObject method.
| TickedComponent | |
|
OnTick(tickRate:Number):void
This method is called every tick by the ProcessManager on any objects
that have been added to it with the AddTickedObject method.
| SimpleSpatialComponent | ||
![]() |
Registers the component with an entity.
| EntityComponent | |
![]() |
Reset():void
This is called by an entity on all of its components any time a component
is added or removed.
| EntityComponent | |
![]() |
Unregister():void
Unregisters the component from an entity.
| EntityComponent | |
| Method | Defined by | ||
|---|---|---|---|
|
_OnAdd():void
| SimpleSpatialComponent | ||
|
_OnRemove():void
| SimpleSpatialComponent | ||
![]() |
_OnReset():void
This is called anytime a component is added or removed from the owner entity.
| EntityComponent | |
| ObjectMask | property |
ObjectMask:ObjectType [read-write]This object's collision flags.
Implementation public function get ObjectMask():ObjectType
public function set ObjectMask(value:ObjectType):void
| Position | property |
public var Position:PointThe position of the object.
| Rotation | property |
public var Rotation:Number = 0The rotation of the object.
| Size | property |
public var Size:PointThe size of the object.
| SpatialManager | property |
SpatialManager:ISpatialManager2D [read-write]The spatial manager this object belongs to.
Implementation public function get SpatialManager():ISpatialManager2D
public function set SpatialManager(value:ISpatialManager2D):void
| Velocity | property |
public var Velocity:PointThe linear velocity of the object in world units per second.
| WorldExtents | property |
WorldExtents:Rectangle [read-only]Axis aligned object bounds in world space.
Implementation public function get WorldExtents():Rectangle
| _OnAdd | () | method |
protected override function _OnAdd():void
| _OnRemove | () | method |
protected override function _OnRemove():void
| CastRay | () | method |
public function CastRay(start:Point, end:Point, mask:ObjectType, info:RayHitInfo):BooleanNot currently implemented. Perform a ray cast against this object.
Parametersstart:Point |
|
end:Point |
|
mask:ObjectType |
|
info:RayHitInfo |
Boolean |
| OnTick | () | method |
public override function OnTick(tickRate:Number):voidThis method is called every tick by the ProcessManager on any objects that have been added to it with the AddTickedObject method.
ParameterstickRate:Number — The amount of time (in seconds) specified for a tick.
|