Skip to content
Snippets Groups Projects
Verified Commit cb727060 authored by Louis's avatar Louis :fire:
Browse files

Use base sets for animation stages

parent 29b12830
No related branches found
No related tags found
No related merge requests found
[package] [package]
name = "micro_banimate" name = "micro_banimate"
version = "0.5.0-beta.0" version = "0.5.0-beta.1"
edition = "2021" edition = "2021"
license = "Apache-2.0" license = "Apache-2.0"
description = "Easily manage complex Bevy 2D sprite animations" description = "Easily manage complex Bevy 2D sprite animations"
......
...@@ -4,6 +4,7 @@ use crate::definitions::*; ...@@ -4,6 +4,7 @@ use crate::definitions::*;
use crate::query::AnimationQuery; use crate::query::AnimationQuery;
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, SystemSet)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, SystemSet)]
#[system_set(base)]
pub enum AnimationSystems { pub enum AnimationSystems {
TickAnimations, TickAnimations,
SyncAnimations, SyncAnimations,
...@@ -83,18 +84,18 @@ pub struct AnimationSystemsPlugin; ...@@ -83,18 +84,18 @@ pub struct AnimationSystemsPlugin;
impl Plugin for AnimationSystemsPlugin { impl Plugin for AnimationSystemsPlugin {
fn build(&self, app: &mut App) { fn build(&self, app: &mut App) {
app.configure_set( app.configure_sets((
AnimationSystems::SyncAnimations CoreSet::PostUpdate,
.after(AnimationSystems::TickAnimations) AnimationSystems::TickAnimations,
.in_base_set(CoreSet::PostUpdate), AnimationSystems::SyncAnimations,
); ));
app.add_event::<AnimationCompleted>() app.add_event::<AnimationCompleted>()
.add_systems( .add_systems(
(tick_animations, tick_simple_sprite_animations) (tick_animations, tick_simple_sprite_animations)
.in_set(AnimationSystems::TickAnimations), .in_base_set(AnimationSystems::TickAnimations),
) )
.add_system(sync_parent_animations.in_set(AnimationSystems::SyncAnimations)); .add_system(sync_parent_animations.in_base_set(AnimationSystems::SyncAnimations));
// #[cfg(feature = "ecs_tilemap")] // #[cfg(feature = "ecs_tilemap")]
// { // {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment