RenderingSystem Class
This system is responsible for rendering tile layers and entities that have the Sprite and Position components.
Constructor
RenderingSystem
-
entitySystemManager
Parameters:
-
entitySystemManager
ManagerThe entity system manager whose entities this system will be working on.
Item Index
Properties
Methods
destroy
()
tileLayers.addToFront
-
tileLayerHandle
Adds a tile layer to the front. The rendering order for front layers is LIFO; layer added to front last will be rendered first.
Parameters:
-
tileLayerHandle
AssetHandleHandle to the tile layer.
tileLayers.addToFront
-
tileLayerHandle
Adds a tile layer to the back. The rendering order for back layers is FIFO; layer added to back last will be rendered last.
Parameters:
-
tileLayerHandle
AssetHandleHandle to the tile layer.
tileLayers.clear
()
Removes all previously added tile layers.
update
-
view
Renders all tile layers and entities to the specified view.
Parameters:
-
view
ViewView everything will be rendered to.
Properties
tileLayers
Object
final
An interface for working with tile layers. Sprites are by default rendered as the middle layer. Adding a layer to the front will cause that layer to be rendered on top of the sprites and other layers. Adding a layer to the back will cause the layer to be rendered under the sprites and other layers.