pub enum GameEvent {
Message(String),
LevelExit {
secret: bool,
},
UseFailed,
SectorSound {
sector: usize,
opening: bool,
start: bool,
},
Switch,
Sound {
id: i32,
at: Option<(f64, f64, f64)>,
},
PlayerHurt(i32),
PlayerDied,
}Expand description
Events surfaced to the front end (sounds, messages, level changes).
Variants§
Message(String)
LevelExit
UseFailed
SectorSound
Switch
Sound
Play sound id; at is a world position or None for the player’s own sounds.
PlayerHurt(i32)
PlayerDied
Trait Implementations§
impl StructuralPartialEq for GameEvent
Auto Trait Implementations§
impl Freeze for GameEvent
impl RefUnwindSafe for GameEvent
impl Send for GameEvent
impl Sync for GameEvent
impl Unpin for GameEvent
impl UnsafeUnpin for GameEvent
impl UnwindSafe for GameEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more