1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//! # animation.rs
//!
//! # animation.rs 文件
//!
//! ## Module Overview
//!
//! ## 模块概述
//!
//! This module powers the game's core sprite animation functionality.
//!
//! 该模块为游戏精灵提供核心动画能力。
//!
//! ## Source File Overview
//!
//! ## 源文件概述
//!
//! The file defines `AnimationPlugin`, which manages sprite animation sync, updates, and clip setup.
//!
//! 本文件定义了 `AnimationPlugin`,用于管理精灵动画的同步、更新与剪辑设置。
pub(crate) mod components;
mod systems;
use bevy::app::{App, Plugin, Update};
use bevy::prelude::IntoScheduleConfigs;
pub(crate) struct AnimationPlugin;
impl Plugin for AnimationPlugin {
fn build(&self, app: &mut App) {
use systems::*;
app.add_systems(
Update,
(
sync_sprite_animation_system,
animate_sprite_system,
update_sprite_animation_system,
setup_sprite_animation_clip_system,
)
.chain(),
);
}
}