Event handling in the Game loop