pub struct StateMachine { /* private fields */ }Implementations§
Source§impl StateMachine
impl StateMachine
pub fn try_new( states: Vec<MachineState>, transitions: Vec<Transition>, animations: HashMap<String, Animation>, ) -> Result<Self, MachineError>
pub fn fire(&mut self, trigger: impl Into<String>)
pub fn set_boolean(&mut self, name: impl Into<String>, value: bool)
pub fn set_number(&mut self, name: impl Into<String>, value: f32)
pub fn inputs(&mut self) -> &mut MachineInputs
pub fn advance(&mut self, dt: f64) -> bool
pub fn frame(&self) -> &AnimationFrame
pub fn current_state(&self) -> &str
pub fn is_active(&self) -> bool
Trait Implementations§
Source§impl Clone for StateMachine
impl Clone for StateMachine
Auto Trait Implementations§
impl Freeze for StateMachine
impl RefUnwindSafe for StateMachine
impl Send for StateMachine
impl Sync for StateMachine
impl Unpin for StateMachine
impl UnsafeUnpin for StateMachine
impl UnwindSafe for StateMachine
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