| Crates.io | statez |
| lib.rs | statez |
| version | 0.1.2 |
| created_at | 2018-11-12 04:02:55.846112+00 |
| updated_at | 2018-11-15 03:13:20.18116+00 |
| description | Basic state management for the ggez game framework. |
| homepage | |
| repository | https://github.com/quailiff/statez |
| max_upload_size | |
| id | 96184 |
| size | 28,345 |
statez provides basic state management for ggez.
StateManager is a wrapper for ggez::event::EventHandler. It keeps track of
States in a stack and passes events received to the topmost (i.e. active)
State. Data can be shared between States.
State::update() should return a StateTransition that tells the
StateManager what should happen next.
hello_world: The simplest example of switching between two states.using_shared_data: An example of a) two
states accessing shared data and b) a state allowing previous states to be
drawn underneath it by returning true in State::draw_previous_state().