zerk.game.engine.system.message Class
Message System
Render message on the display.
Item Index
Methods
Methods
_clearMessages
()
protected
Removes messages that timed out
_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
_renderMessages
()
protected
Renders messages
clearMessages
()
Removes all messages
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
registerMessage
-
message
Registers a message
Parameters:
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:
unregisterMessage
-
id
Unregisters a message
Parameters:
-
id
StringMessage id
update
()
Updates the system
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
_messages
Array
protected
Text messages
_name
String
protected
Name of the system
_priority
Integer
protected
Priority of this system
_thread
String
protected
Thread that runs this system
name
String
Name of the system