Packagecom.pblabs.engine.components
Classpublic class TickedComponent
InheritanceTickedComponent Inheritance EntityComponent Inheritance Object
Implements ITickedObject
Subclasses BackgroundMusicComponent, FSMComponent, SimpleSpatialComponent

Base class for components that need to perform actions every tick. This needs to be subclassed to be useful.



Public Properties
 PropertyDefined By
 InheritedisRegistered : Boolean
[read-only] Whether or not the component is currently registered with an entity.
EntityComponent
 Inheritedname : String
[read-only] The name given to the component when it is added to an entity.
EntityComponent
 Inheritedowner : IEntity
A reference to the entity that this component currently belongs to.
EntityComponent
  registerForTicks : Boolean
Set to register/unregister for tick updates.
TickedComponent
  updatePriority : Number = 0.0
The update priority for this component.
TickedComponent
Public Methods
 MethodDefined By
  
onTick(deltaTime:Number):void
This method is called every tick by the ProcessManager on any objects that have been added to it with the AddTickedObject method.
TickedComponent
 Inherited
register(owner:IEntity, name:String):void
Registers the component with an entity.
EntityComponent
 Inherited
reset():void
This is called by an entity on all of its components any time a component is added or removed.
EntityComponent
 Inherited
unregister():void
Unregisters the component from an entity.
EntityComponent
Protected Methods
 MethodDefined By
  
onAdd():void
[override]
TickedComponent
  
onRemove():void
[override]
TickedComponent
 Inherited
onReset():void
This is called anytime a component is added or removed from the owner entity.
EntityComponent
Property Detail
registerForTicksproperty
registerForTicks:Boolean

Set to register/unregister for tick updates.


Implementation
    public function get registerForTicks():Boolean
    public function set registerForTicks(value:Boolean):void
updatePriorityproperty 
public var updatePriority:Number = 0.0

The update priority for this component. Higher numbered priorities have onInterpolateTick and onTick called before lower priorities.

Method Detail
onAdd()method
override protected function onAdd():void

onRemove()method 
override protected function onRemove():void

onTick()method 
public function onTick(deltaTime:Number):void

This method is called every tick by the ProcessManager on any objects that have been added to it with the AddTickedObject method.

Parameters

deltaTime:Number — The amount of time (in seconds) specified for a tick.