amethyst_test 0.15.3

Amethyst test utilities crate
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use amethyst::prelude::*;

/// Exposes the `update` method of game data so that this crate's `State`s can invoke it.
pub trait GameUpdate {
    /// Runs the systems to update the game.
    ///
    /// # Parameters
    ///
    /// * `world`: `World` in which the game takes place.
    fn update(&mut self, _world: &World) {}
}

// Implement for built-in Amethyst `GameData`
impl<'a, 'b> GameUpdate for GameData<'a, 'b> {
    fn update(&mut self, world: &World) {
        GameData::update(self, world);
    }
}