pub struct HitFlash { /* private fields */ }Expand description
Hit flash effect for paddle collision feedback.
Implementations§
Source§impl HitFlash
impl HitFlash
Sourcepub fn trigger(&mut self, right_paddle: bool, intensity: f32, duration: f32)
pub fn trigger(&mut self, right_paddle: bool, intensity: f32, duration: f32)
Triggers a hit flash on a paddle.
§Arguments
right_paddle- True for right paddle, false for leftintensity- Flash brightness (0.0-1.0)duration- How long the flash lasts
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HitFlash
impl RefUnwindSafe for HitFlash
impl Send for HitFlash
impl Sync for HitFlash
impl Unpin for HitFlash
impl UnwindSafe for HitFlash
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