zerk.game.engine.system.wireframe Class
Wireframe System
Render the world as wireframes for debugging purposes.
Item Index
Methods
- _getConfigDefaults
- _getFixtureBoundingStyle
- _getSystem
- _log
- _renderBody
- _renderBodyAngleIndicator
- _renderEntity
- _renderEntityOriginIndicator
- _renderFixture
- _renderFixtureBoundingCircle
- _renderFixtureBoundingPolygon
- _renderFixtureBoundingShape
- _renderFixtureBoundingShape
- addEntity
- fireEvent
- getName
- getPriority
- getThread
- init
- on
- removeEntity
- start
- stop
- un
- update
- useComponent
Methods
_getConfigDefaults
()
Object
protected
Returns the configuration defaults of the system
Returns:
_getFixtureBoundingStyle
-
entity
-
body
-
fixture
Returns the style of a fixture bounding shape
Parameters:
-
entity
config.entityEntity state
-
body
config.component.physics.bodyBody state
-
fixture
config.component.physics.fixtureFixture state
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
_renderBody
-
entity
-
body
Renders a body onto the game canvas
Parameters:
-
entity
config.entityEntity state
-
body
config.component.physics.bodyBody state
_renderBodyAngleIndicator
-
entity
-
body
Renders an angle indicator for each body of the entity
Parameters:
-
entity
config.entityEntity state
-
body
config.component.physics.bodyBody state
_renderEntity
-
entity
Renders an entity onto the game canvas
Parameters:
-
entity
config.entityEntity state
_renderEntityOriginIndicator
-
entity
Renders the entity origin indicator
Parameters:
-
entity
config.entityEntity state
_renderFixture
-
entity
-
body
-
fixture
Renders a fixture onto the body buffer canvas
Parameters:
-
entity
config.entityEntity state
-
body
config.component.physics.bodyBody state
-
fixture
config.component.physics.fixtureFixture state
_renderFixtureBoundingCircle
-
entity
-
body
-
fixture
Renders the bounding area for a circle shaped fixture
Parameters:
-
entity
config.entityEntity state
-
body
config.component.physics.bodyBody state
-
fixture
config.component.physics.fixtureFixture state
_renderFixtureBoundingPolygon
-
entity
-
body
-
fixture
Renders the bounding area for a polygon shaped fixture
Parameters:
-
entity
config.entityEntity state
-
body
config.component.physics.bodyBody state
-
fixture
config.component.physics.fixtureFixture state
_renderFixtureBoundingShape
-
entity
-
body
-
fixture
Renders a shape indicating the bounding area of a fixture
Delegate method for the fixture bounding shape methods
Parameters:
-
entity
config.entityEntity state
-
body
config.component.physics.bodyBody state
-
fixture
config.component.physics.fixtureFixture state
_renderFixtureBoundingShape
-
entity
-
body
-
fixture
Renders the bounding area for a box shaped fixture
Parameters:
-
entity
config.entityEntity state
-
body
config.component.physics.bodyBody state
-
fixture
config.component.physics.fixtureFixture state
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
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
_thread
String
protected
Thread that runs this system