Enum Deflection
#[non_exhaustive]pub enum Deflection {
Reverse,
AimDeflect,
MomentumDeflect,
}Expand description
ProjectileDeflection: how ProjectileRef::deflect turns a projectile.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Reverse
REVERSE: backwards at -power / 2 of the speed, turned about 180
degrees by a random amount.
AimDeflect
AIM_DEFLECT: along the deflecting entity’s look.
MomentumDeflect
MOMENTUM_DEFLECT: along the deflecting entity’s movement.
Trait Implementations§
§impl Clone for Deflection
impl Clone for Deflection
§fn clone(&self) -> Deflection
fn clone(&self) -> Deflection
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for Deflection
§impl Debug for Deflection
impl Debug for Deflection
impl Eq for Deflection
§impl PartialEq for Deflection
impl PartialEq for Deflection
impl StructuralPartialEq for Deflection
Auto Trait Implementations§
impl Freeze for Deflection
impl RefUnwindSafe for Deflection
impl Send for Deflection
impl Sync for Deflection
impl Unpin for Deflection
impl UnsafeUnpin for Deflection
impl UnwindSafe for Deflection
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