Struct gg::scene::StackSceneManager [] [src]

pub struct StackSceneManager<T: Sized + Clone> {
    // some fields omitted
}

A sample implementation of SceneManager can be used as is for a stack based scene system. The type parameter is the state of the game.

Methods

impl<T: Clone> StackSceneManager<T>

fn new(state: T) -> StackSceneManager<T>

Creates a new StackSceneManager. It has nothing in it, you probably want to use with_scene

fn with_scene(state: T, scene: Box<Scene<State=T>>) -> StackSceneManager<T>

Creates a StackSceneManager with

Trait Implementations

impl<T> SceneManager<T> for StackSceneManager<T> where T: Sized + Clone

fn get_scenes(&self) -> &Vec<Box<Self::Scene>>

fn get_scenes_mut(&mut self) -> &mut Vec<Box<Self::Scene>>

fn handle_transition(&mut self, trans: Self::SceneTransition)

fn update(&mut self, dt: f64, keys: &Keys)

fn display(&mut self, display: &GlutinFacade)

type Scene: ?Sized + HasId = Scene<State=T>

type SceneTransition = SceneTransition<T>