Header menu logo Mibo

AnimatedSprite Type

Runtime state for a playing animation.

This is a small struct designed for zero-allocation updates. Store this in your Elmish model for each animated entity.

Record fields

Record Field Description

AnimationIndex

Full Usage: AnimationIndex

Field type: int

Index into AnimationsByIndex (faster than string lookup every frame).

Field type: int

Color

Full Usage: Color

Field type: Color

Tint color.

Field type: Color

CurrentFrame

Full Usage: CurrentFrame

Field type: int

Current frame index within the animation.

Field type: int

Finished

Full Usage: Finished

Field type: bool

Has animation finished? (non-looping only)

Field type: bool

FlipX

Full Usage: FlipX

Field type: bool

Flip horizontally?

Field type: bool

FlipY

Full Usage: FlipY

Field type: bool

Flip vertically?

Field type: bool

Rotation

Full Usage: Rotation

Field type: float32

Rotation in radians.

Field type: float32

Scale

Full Usage: Scale

Field type: float32

Scale factor.

Field type: float32

Sheet

Full Usage: Sheet

Field type: SpriteSheet

Reference to the loaded sprite sheet.

Field type: SpriteSheet

TimeInFrame

Full Usage: TimeInFrame

Field type: float32

Time accumulated in the current frame (seconds).

Field type: float32

Type something to start searching.