Skip to content

Commit

Permalink
chore!: Remove Reflect implementation from SpriteSheetAnimation, …
Browse files Browse the repository at this point in the history
…`AnimationMode` and `Frame`

They are no longer used in components. Reflect unnecessary leak some
implementation detail that cannot be changed without introducing a
breaking change. And they caused a problem while upgrading to bevy 0.6.
  • Loading branch information
jcornaz committed Dec 28, 2021
1 parent 1ebf47e commit 04af5e1
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/animation.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
use std::ops::RangeInclusive;
use std::time::Duration;

use bevy_ecs::prelude::*;
use bevy_reflect::{Reflect, TypeUuid};
use bevy_reflect::TypeUuid;

/// Asset that define an animation of `TextureAtlasSprite`
///
/// See crate level documentation for usage
#[derive(Debug, Clone, Default, Reflect, TypeUuid)]
#[reflect(Component)]
#[derive(Debug, Clone, Default, TypeUuid)]
#[uuid = "6378e9c2-ecd1-4029-9cd5-801caf68517c"]
pub struct SpriteSheetAnimation {
/// Frames
Expand All @@ -18,7 +16,7 @@ pub struct SpriteSheetAnimation {
}

/// Animation mode (run once or repeat)
#[derive(Debug, Copy, Clone, Eq, PartialEq, Reflect)]
#[derive(Debug, Copy, Clone, Eq, PartialEq)]
pub enum AnimationMode {
/// Runs the animation once and then stop playing
Once,
Expand All @@ -28,7 +26,7 @@ pub enum AnimationMode {
}

/// A single animation frame
#[derive(Debug, Copy, Clone, Default, Reflect)]
#[derive(Debug, Copy, Clone, Default)]
pub struct Frame {
/// Index in the sprite atlas
pub index: u32,
Expand Down

0 comments on commit 04af5e1

Please sign in to comment.