pub struct MascotComponent {
pub frames: MascotFrames,
pub entrance: f64,
pub dissolve: f64,
pub floating: bool,
/* private fields */
}Expand description
Wizard mascot with entrance/dissolve progress, floating bobbing, and cached distance map.
Owns all per-frame effect state (tick counters and dissolve tile grid) so the wizard loop doesn’t have to manage them externally.
Fields§
§frames: MascotFrames§entrance: f64§dissolve: f64§floating: boolImplementations§
Source§impl MascotComponent
impl MascotComponent
pub fn blizz() -> Self
Sourcepub fn advance_effect_ticks(&mut self)
pub fn advance_effect_ticks(&mut self)
Advance entrance and dissolve tick counters for the current frame.
Sourcepub fn init_dissolve(&mut self, rng: &mut Box<dyn Rng>) -> usize
pub fn init_dissolve(&mut self, rng: &mut Box<dyn Rng>) -> usize
Build and store the dissolve tile grid. Returns total_ticks for
the caller to track progress against.
Trait Implementations§
Source§impl Clone for MascotComponent
impl Clone for MascotComponent
Source§fn clone(&self) -> MascotComponent
fn clone(&self) -> MascotComponent
Returns a duplicate 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 Component for MascotComponent
Available on non-tarpaulin_include only.
impl Component for MascotComponent
Available on non-
tarpaulin_include only.Auto Trait Implementations§
impl Freeze for MascotComponent
impl RefUnwindSafe for MascotComponent
impl Send for MascotComponent
impl Sync for MascotComponent
impl Unpin for MascotComponent
impl UnsafeUnpin for MascotComponent
impl UnwindSafe for MascotComponent
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