#[non_exhaustive]pub enum Mode {
Normal,
Roll {
t: f32,
},
HardLand {
t: f32,
},
Dash {
t: f32,
dx: f32,
dy: f32,
},
Climb,
Dive {
t: f32,
},
SuperCharge {
t: f32,
wall: i32,
},
SuperDash {
dir: i32,
},
DiveLand {
t: f32,
},
Custom {
id: CustomId,
t: f32,
},
}Expand description
What the body is busy with, beyond plain running and jumping. New moves bring new
modes, so matches need a _ arm.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Normal
Free movement.
Roll
Rolling out of a high landing.
HardLand
Recovering from a hard landing.
Dash
Dashing in a fixed direction, gravity off.
Fields
Climb
Holding on to the wall on the facing side.
Dive
Diving: a short hang, then straight down.
SuperCharge
Charging a super dash, standing (wall 0) or holding on to the wall on side wall.
SuperDash
Flying a super dash: straight and level until a wall or a cancel.
DiveLand
Recovering from a dive’s impact.
Custom
A move of your own (super::Ability) has the body: no built-in move starts or
runs, no gravity; it still moves by its speed, collides and lands.
Fields
§
id: CustomIdWhich of your moves (see super::CustomId; the same kind of id as
Event::Custom).
Trait Implementations§
impl Copy for Mode
impl StructuralPartialEq for Mode
Auto Trait Implementations§
impl Freeze for Mode
impl RefUnwindSafe for Mode
impl Send for Mode
impl Sync for Mode
impl Unpin for Mode
impl UnsafeUnpin for Mode
impl UnwindSafe for Mode
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.