new GameLoop()
Manages the main game loop, calling update and render functions
at a consistent rate.
- Source:
Methods
setRender(newRenderFunction)
Sets a new render function for the game loop.
Parameters:
Name | Type | Description |
---|---|---|
newRenderFunction |
function | The new function to call for rendering the game. |
- Source:
setUpdate(newUpdateFunction)
Sets a new update function for the game loop.
Parameters:
Name | Type | Description |
---|---|---|
newUpdateFunction |
function | The new function to call for game logic updates. |
- Source:
start()
Starts the game loop.
Logs a warning if the loop is already running.
- Source:
stop()
Stops the game loop.
- Source: