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]

[src]

Create a new scene

[src]

Update animation's state

[src]

Render this scene

[src]

Render this scene with tint

[src]

Register animation with sprite

[src]

Pause a running animation of the sprite

[src]

Resume a paused animation of the sprite

[src]

Toggle an animation of the sprite

[src]

Stop a running animation of the sprite

[src]

Stop all running animations of the sprite

[src]

Get all the running animations in the scene

[src]

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

[src]

Add sprite to scene

[src]

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

[src]

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.

[src]

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

[src]

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

[src]

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