[][src]Enum game::sandbox::gameplay::GameplayMode

pub enum GameplayMode {
    Freeform(MapName),
    PlayScenario(MapNameStringVec<ScenarioModifier>),
    FixTrafficSignals,
    OptimizeCommute(OrigPersonIDDuration),
    Tutorial(TutorialPointer),
}

Variants

Freeform(MapName)
PlayScenario(MapNameStringVec<ScenarioModifier>)
FixTrafficSignals
OptimizeCommute(OrigPersonIDDuration)
Tutorial(TutorialPointer)

Implementations

impl GameplayMode[src]

pub fn map_name(&self) -> MapName[src]

pub fn scenario(
    &self,
    app: &App,
    rng: XorShiftRng,
    timer: &mut Timer<'_>
) -> LoadScenario
[src]

pub fn can_edit_lanes(&self) -> bool[src]

pub fn can_edit_stop_signs(&self) -> bool[src]

pub fn can_jump_to_time(&self) -> bool[src]

pub fn allows(&self, edits: &MapEdits) -> bool[src]

pub fn initialize(
    &self,
    ctx: &mut EventCtx<'_>,
    app: &mut App
) -> Box<dyn GameplayState>
[src]

Must be called after the scenario has been setup. The caller will call recreate_panels after this, so each constructor doesn't need to.

Trait Implementations

impl Clone for GameplayMode[src]

impl Eq for GameplayMode[src]

impl Ord for GameplayMode[src]

impl PartialEq<GameplayMode> for GameplayMode[src]

impl PartialOrd<GameplayMode> for GameplayMode[src]

impl StructuralEq for GameplayMode[src]

impl StructuralPartialEq for GameplayMode[src]

Auto Trait Implementations

impl RefUnwindSafe for GameplayMode

impl Send for GameplayMode

impl Sync for GameplayMode

impl Unpin for GameplayMode

impl UnwindSafe for GameplayMode

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Downcast for T where
    T: Any

impl<T> DowncastSync for T where
    T: Send + Sync + Any

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,