[][src]Crate statez

Introduction

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.

Examples

Structs

StateManager

Passes events onto the topmost (i.e. active) State. T is the type of data shared between states.

Enums

StateTransition

Indicates whether the state should be changed.

Traits

State

T is the type of data shared between states.