Skip to main content

StartingResources

Trait StartingResources 

Source
pub trait StartingResources {
    // Required method
    fn init(tick: &Tick) -> Self;
}
Expand description

The starting resources of a game mode. These are provided to the player at the beginning of the game.

Required Methods§

Source

fn init(tick: &Tick) -> Self

Called once at the start of the game before control is handed to the player to create the starting resources.

§Parameters
  • tick: The current game tick. Since this method is called at the start of the game, this will always be tick 0.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§