Module ggez::game [] [src]

The game module contains traits and structs to actually run your game mainloop and handle top-level state.



The Game struct takes an object you define that implements the GameState trait and does the actual work of running a gameloop, passing events to your handlers, and all that stuff.



A trait for defining a game state. Implement load(), update() and draw() callbacks on this trait and create a Game object using your gamestate type. You may also implement the *_event callbacks if you wish to handle those events.