Component extends Emitter#
cruft/core/Component.js
This class defines a Component.
Importing#
import Component from "cruft/core/Component";
Constructors#
Component( [ guid ] )#
guid - guid of the component.
let component = new Component();
Properties#
.guid - guid of the component.
.actor - Strong reference to the parent Actor.
Methods#
initialize( )#
Initializes the component.
initialize is already called once the component has been added to an active actor in the scene.
component.initialize();
update( now, deltaMs )#
Update the component every game loop.
component.update(now, deltaMs);
destroy( )#
//DESC
//EXAMPLE