Kiwi.Component Class
The base class that all components extend from. It contains all of the common functionality that is required of every Component. Any object
Constructor
Kiwi.Component
-
owner
-
componentName
Parameters:
-
owner
ObjectThe object that this component belongs to.
-
componentName
StringThe name of this component.
Returns:
Item Index
Methods
Methods
destroy
()
public
Destroys this component and all of the properties that exist on it.
objType
()
String
public
Returns the type of this object
Returns:
"Component"
postUpdate
()
public
Components can postUpdate, that is run an update after the parent has updated. This is to be overriden by subclasses.
preUpdate
()
public
Components can preUpdate, that is update before the parent updates. This is to be overriden by subclasses.
update
()
public
If the component is being added to a State rather than a Game Object then over-ride its update method to perform required tasks.
Properties
active
Boolean
public
An active Component is one that has its update method called by its parent.
Default: true
dirty
Boolean
deprecated
public
The state of this component.
Default: false
name
String
public
The name of this component.
owner
Object
public
The object that owns this entity