zerk.game.engine.worldLoader Class
World Loader
Loads world definitions from JSON files.
Item Index
Properties
Methods
_loadEntities
(
protected
async
-
world
-
entities
-
successHandler
-
errorHandler
Loads given entities
Parameters:
-
world
ObjectWorld definition
-
entities
ArrayArray of entities
-
successHandler
FunctionEvent handler for success
-
errorHandler
FunctionEvent handler for error
_onLoadEntities
(
protected
-
world
-
entities
-
successHandler
-
errorHandler
Fires when the entities are loaded
Parameters:
-
world
ObjectWorld definition
-
entities
ArrayArray of entities
-
successHandler
FunctionEvent handler for success
-
errorHandler
FunctionEvent handler for error
_onLoadWorld
(
protected
async
-
world
-
successHandler
-
errorHandler
Fires when the world is loaded
Parameters:
-
world
ObjectWorld definition
-
successHandler
FunctionEvent handler for success
-
errorHandler
FunctionEvent handler for error
loadWorld
(
async
-
name
-
successHandler
-
errorHandler
Loads a world by given resource id
Parameters:
-
name
StringWorld resource id
-
successHandler
FunctionEvent handler for success
-
errorHandler
FunctionEvent handler for error