update method

void update(
  1. double dt
)

Updates the game entities at each frame.

Implementation

void update(double dt) {
  for (GameEntity entity in entities) {
    entity.update(dt);
  }
  notifyListeners(); // notify to update the rendering
}