onUpdate method
Called repeatedly by the game loop to update game logic.
Override this method to implement your game's core logic, such as:
- Handling player input from keyboard, mouse, gamepad, or accel.
- Updating positions and states of game objects.
- Performing collision detection.
- Managing game flow (e.g., levels, scores).
The frequency of calls to this method is determined by updateRate.
This method is only called if loader.done
is true (i.e., all initial
resources have finished loading, if you don't have set isEnabled
property of loader to false).
Implementation
void onUpdate() {}