pub struct Mover<const N: usize> {
pub pos: [i32; N],
pub top: i32,
/* private fields */
}Fields§
§pos: [i32; N]§top: i32Implementations§
Source§impl<const N: usize> Mover<N>
impl<const N: usize> Mover<N>
pub fn new(pos: [i32; N], top: i32) -> Self
pub fn stun(&mut self, ticks: u32)
pub fn slow(&mut self, num: u32, den: u32, ticks: u32)
pub fn clear_effects(&mut self)
pub const fn stunned(&self) -> u32
pub fn slows(&self) -> &[Slow]
pub fn speed(&self) -> i32
pub fn step(&mut self, target: [i32; N]) -> [i32; N]
Trait Implementations§
impl<const N: usize> Eq for Mover<N>
impl<const N: usize> StructuralPartialEq for Mover<N>
Auto Trait Implementations§
impl<const N: usize> Freeze for Mover<N>
impl<const N: usize> RefUnwindSafe for Mover<N>
impl<const N: usize> Send for Mover<N>
impl<const N: usize> Sync for Mover<N>
impl<const N: usize> Unpin for Mover<N>
impl<const N: usize> UnsafeUnpin for Mover<N>
impl<const N: usize> UnwindSafe for Mover<N>
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