GameLoop allows for easy use of the GameLoop library as it manages the creation and setup of the basic individual components. It includes a basic GUI for common operations, monitoring and visualisation.
Returns the GameLoop instance. GameLoop is a singleton (can have only one instance).
Create a new world with the given dimensions. These arguments are used for the creation of an instance of SpatialHashing.
sceneWidth |
in meters |
sceneHeight |
in meters |
cellSize |
in meters |
Close the GUI.
Clear and close everything.
Add four wall at the edge of the space.
Change the space size and cell size.
Smoothly return the camera to the center of the space.
Get the center of the space.
Get the EntityManager instance used.
Snap the camera to the center of the space.
Make edge walls.
Clear all entities.
The camera will only be removed when this method is called.
Get the RepresentationManager.
Start the game loop. Set the world into motion.
rate |
The 'frame rate' of the game loop. Usually leave it as the default 0.05. |
Stop the game loop.
Remove the edge walls.
Clear all walls.
Create the GUI and visualiser.