struct ActiveSprite {
def_index: usize,
eval: MilkEvaluator,
initialised: bool,
frame: u32,
burn_pending: bool,
finished: bool,
}Expand description
One running sprite instance.
Fields§
§def_index: usizeIndex into SpriteManager::defs — used to recover the
texture index without re-walking the def list each frame.
eval: MilkEvaluatorPer-instance variable state. The init block runs once on spawn; per_frame runs every tick.
initialised: booltrue after the first per_frame tick — used to gate the
init block, which mustn’t re-run.
frame: u32Frames since spawn. Exposed to the equations as frame.
burn_pending: boolBurn-pending: set on the tick the sprite’s done variable
goes truthy AND the def had burn=1. The renderer reads
this on the next render to draw the sprite into
render_texture once, then the manager prunes it.
finished: booltrue once done is set and we’ve already emitted the burn
(if any). Pruned at end-of-frame.
Auto Trait Implementations§
impl Freeze for ActiveSprite
impl !RefUnwindSafe for ActiveSprite
impl Send for ActiveSprite
impl Sync for ActiveSprite
impl Unpin for ActiveSprite
impl !UnwindSafe for ActiveSprite
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
§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
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