pub enum ActionKind {
Instant,
Held,
Toggle,
}
Expand description
The button press pattern to be used to trigger a specific action.
Variants§
Instant
Actions that happen right away when the button is pressed, and stop happening until the next press.
Held
Actions that start happening when the button is pressed, and stop happening when it’s released.
Toggle
(Accessible alternative for ActionKind::Held
, gameplay logic shouldn’t
really change between these two.) Actions that start happening when the
button is pressed one time, and stop happening when it’s pressed again.
Trait Implementations§
Source§impl Clone for ActionKind
impl Clone for ActionKind
Source§fn clone(&self) -> ActionKind
fn clone(&self) -> ActionKind
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Default for ActionKind
impl Default for ActionKind
Source§fn default() -> ActionKind
fn default() -> ActionKind
Returns the “default value” for a type. Read more
impl Copy for ActionKind
Auto Trait Implementations§
impl Freeze for ActionKind
impl RefUnwindSafe for ActionKind
impl Send for ActionKind
impl Sync for ActionKind
impl Unpin for ActionKind
impl UnwindSafe for ActionKind
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