pub trait SceneType {
    type SpawnableIdType: SpawnableEnum + 'static;

    fn new() -> Self
    where
        Self: Sized
; fn config(&mut self, game: &mut GameControl) -> SceneConfig<Self>
    where
        Self: Sized
; fn spawn(
        &mut self,
        spawn: &mut SpawnControl,
        spawnable_id: Self::SpawnableIdType,
        game: &mut GameControl,
        x: f64,
        y: f64,
        args: &DynArgList
    ) { ... } }
Expand description

A trait containing information on how to instantiate spawnables in the scene, and which systems this scene should include.

Required Associated Types

The enum to use to identify different spawnables. You can generate this using the spawnables! macro.

Required Methods

Creates a new instance of the SceneType

Used to create a SceneConfig object, which includes information such as which systems to use.

Provided Methods

Used to construct a set of Components given a spawnable type. It is recommended that you use the spawnables! macro and SpawnableConfig trait to define this logic in separate modules.

Implementors