ggwp-zscene
ggwp-zscene is a simple scene and declarative animation manager.
Made for Zemeroth game. Historically was part of Häte crate.
This crate provides:
Sprites that can be sharedSceneandActions to manipulate it- Basic layers
Examples
The following code sample shows how to create sprite, add it to the scene and move it:
let mut sprite = Sprite::from_path(context, "/fire.png", 0.5)?;
sprite.set_pos(Point2::new(0.0, -1.0));
let delta = Vector2::new(0.0, 1.5);
let time = Duration::from_millis(2_000);
let action = action::Sequence::new(vec![
action::Show::new(&self.layers.fg, &sprite).boxed(), // show the sprite
action::MoveBy::new(&sprite, delta, time).boxed(), // move it
]);
self.scene.add_action(action.boxed());See examples/action.rs for a complete example.
What does a ggwp- prefix mean?
As Icefoxen asked to not use ggez- prefix
I use ggwp- ("good game, well played!") to denote that the crate
belongs to ggez ecosystem, but is not official.