pub struct Combo {
pub id: String,
pub name: String,
pub links: Vec<ComboLink>,
pub hits: Vec<ComboHit>,
pub ender: Option<ComboEnder>,
pub requires_airborne: bool,
pub requires_grounded: bool,
pub priority: u32,
}Fields§
§id: String§name: String§links: Vec<ComboLink>§hits: Vec<ComboHit>§ender: Option<ComboEnder>§requires_airborne: bool§requires_grounded: bool§priority: u32Implementations§
Source§impl Combo
impl Combo
pub fn new(id: impl Into<String>, name: impl Into<String>) -> Self
pub fn add_link(self, input: ComboInput, window: f32) -> Self
pub fn add_hit(self, hit: ComboHit) -> Self
pub fn with_ender(self, name: impl Into<String>, dmg_mult: f32) -> Self
pub fn aerial(self) -> Self
pub fn grounded(self) -> Self
pub fn with_priority(self, p: u32) -> Self
pub fn total_damage_multiplier(&self) -> f32
pub fn input_sequence(&self) -> Vec<ComboInput>
Sourcepub fn matches_sequence(&self, inputs: &[ComboInput]) -> bool
pub fn matches_sequence(&self, inputs: &[ComboInput]) -> bool
Check if a given input history matches this combo’s sequence.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Combo
impl RefUnwindSafe for Combo
impl Send for Combo
impl Sync for Combo
impl Unpin for Combo
impl UnsafeUnpin for Combo
impl UnwindSafe for Combo
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> 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.