Constructor
Variables
Methods
createEntity (?components:Array<Component>):Entity
Construct a new entity
Parameters:
components | An optional list of starting components |
|---|
Returns:
Entity
destroyEntity (entity:Entity):Void
getResource<T> (type:ResourceTypeID):Null<T>
Get a resource / global component from the Universe. If an instance
has not yet been set using setResource, this will return null
Parameters:
type | the ID of the resource to retrieve: |
|---|
Returns:
Null
loadEntities (buf:String):LoadResult
Load the entities saved by saveEntities, deleting any currently existing ones
Note: the function will
Parameters:
buf | The state generated by |
|---|
Returns:
LoadResult
saveEntities ():String
Serialize the entities / state into a string using the Haxe serializer
Note: the git version is stored alongside the serialized data to ensure proper entity matching!
Returns:
String
setResource (resource:Resource):Void
Store a resource / global component in the Universe
Parameters:
resource | the resource with type to set |
|---|