zerk.game.engine.componentLoader Class
Component Loader
Builds component states.
Item Index
Methods
Properties
Methods
buildComponents
(
config.entity
-
entity
-
config
Build the component states of an entity
Parameters:
-
entity
config.entityEntity definition
-
config
config.entityWorld configuration
Returns:
config.entity:
The final entity state
init
(
-
jsonLoader
-
componentMap
Class constructor
Parameters:
-
jsonLoader
zerk.jsonLoaderJSON loader instance
-
componentMap
ObjectComponent name to class map
loadComponents
(
async
-
components
-
successHandler
-
errorHandler
Preloads given components
Parameters:
-
components
ArrayArray of component names
-
successHandler
FunctionEvent handler for success
-
errorHandler
FunctionEvent handler for error
Properties
_component
Object
protected
Component register
_componentMap
Object
protected
Component name to class map