Struct sprite::Scene[][src]

pub struct Scene<I: ImageSize> { /* fields omitted */ }

A scene is used to manage sprite's life and run animation with sprite

Methods

impl<I: ImageSize> Scene<I>
[src]

Create a new scene

Update animation's state

Render this scene

Render this scene with tint

Register animation with sprite

Pause a running animation of the sprite

Resume a paused animation of the sprite

Toggle an animation of the sprite

Stop a running animation of the sprite

Stop all running animations of the sprite

Get all the running animations in the scene

Get the number of running animations for a sprite. If sprite does not exist, returns None.

Add sprite to scene

Remove the child by id from the scene's children or grandchild will stop all the animations run by this child

Remove the child by id from the scene's children or grandchild once all of its animations have finished. If the child current has no animations, it is removed immediately. Children with paused animations will not be removed until the animations are resumed and completed.

Find the child by id from the scene's children or grandchild

Find the child by id from this sprite's children or grandchild, mutability

Important traits for Vec<u8>

Get the list of top-level (non-child) sprites.

Auto Trait Implementations

impl<I> !Send for Scene<I>

impl<I> !Sync for Scene<I>