zerk.game.engine.system.damager Class
Damager System
Damages or destroys entites.
Item Index
Methods
Methods
_getConfigDefaults
()
Object
protected
Returns the configuration defaults of the system
Returns:
_getSystem
-
name
Returns system by given name
This method is used to communicate with other systems.
Parameters:
-
name
StringSystem name
Returns:
_log
-
message
-
severity
Local log method
Parameters:
-
message
StringLog message
-
severity
IntegerLog severity
_onContactBegin
-
sourceInfo
-
targetInfo
Fires when two fixtures collide
Parameters:
-
sourceInfo
ObjectContact source information
-
targetInfo
ObjectContact target information
fireEvent
-
event
Fire event
Parameters:
-
event
StringEvent name
Returns:
getName
()
String
Returns the name of the system
Returns:
getPriority
()
Integer
Returns the priority of the system
Returns:
getThread
()
String
Returns the thread the systems runs in
Returns:
init
-
engine
-
config
Class constructor
Parameters:
-
engine
zerk.game.engineGame engine
-
config
ObjectSystem configuration
on
-
event
-
callback
-
scope
Register event handler
Parameters:
-
event
StringEvent name
-
callback
FunctionCallback function. Return false to cancel event bubble.
-
scope
ObjectScope to be used in callback function
removeEntity
-
entity
Removes an entity from the system
Parameters:
-
entity
config.entityEntity state
start
()
Starts the system
stop
()
Stops the system
un
-
event
-
callback
Unregister event handler
Parameters:
-
event
StringEvent name
-
callback
FunctionCallback function
Returns:
update
()
Updates the system
Fired every tick.
useComponent
-
name
Returns true when the system is interested in given component
Parameters:
-
name
StringComponent name
Returns:
Properties
_config
Object
protected
System configuration
_entities
Array
protected
Entities register
Entities that this system is interested in.
_eventListeners
Array
protected
List of event handlers
_name
String
protected
Name of the system
_priority
Integer
protected
Priority of this system
Priorities handle the order in which systems are processed.
_thread
String
protected
Thread that runs this system