pub enum EventType {
ObjectTouch(i16),
Apple,
Turn,
VoltRight,
VoltLeft,
Ground(f32),
}Expand description
Type of event.
Variants§
ObjectTouch(i16)
Object touch, with index of the object. The index corresponds to a sorted object array having the order: killers, apples, flowers, start.
Apple
Apple take. An apple take in replay always generates 2 events (an ObjectTouch and an AppleTake).
Turn
Bike turn.
VoltRight
Bike volt right.
VoltLeft
Bike volt left.
Ground(f32)
Ground touch. The float is in range [0, 0.99] and possibly denotes the strength of the touch.
Trait Implementations§
impl StructuralPartialEq for EventType
Auto Trait Implementations§
impl Freeze for EventType
impl RefUnwindSafe for EventType
impl Send for EventType
impl Sync for EventType
impl Unpin for EventType
impl UnwindSafe for EventType
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more