diff --git a/README.md b/README.md index f5ee180..4e8841a 100644 --- a/README.md +++ b/README.md @@ -6,4 +6,4 @@ Running on Bevy v.013 This is an attempt to learn rust/bevy and recreate his experience. -![screenshot](assets/screen.png) +![screenshot](assets/screenshot.png) diff --git a/assets/screen.png b/assets/screen.png deleted file mode 100644 index 7c4ce89..0000000 Binary files a/assets/screen.png and /dev/null differ diff --git a/assets/screenshot.png b/assets/screenshot.png new file mode 100644 index 0000000..7922fe9 Binary files /dev/null and b/assets/screenshot.png differ diff --git a/assets/tuner_logo.png b/assets/tuner_logo.png new file mode 100644 index 0000000..6476aa4 Binary files /dev/null and b/assets/tuner_logo.png differ diff --git a/src/components.rs b/src/components.rs index 405d0b2..e02165f 100644 --- a/src/components.rs +++ b/src/components.rs @@ -25,6 +25,12 @@ pub enum Collider { Enemy, } +#[derive(Component)] +struct Rotatable { + speed: f32, + direction: u8, +} + // MoveDirection Component #[derive(PartialEq, Copy, Clone, Debug)] pub enum MoveDirection { diff --git a/src/game/enemies.rs b/src/game/enemies.rs index 3e44b94..fe0d559 100644 --- a/src/game/enemies.rs +++ b/src/game/enemies.rs @@ -8,6 +8,7 @@ impl Plugin for EnemyPlugin { fn build(&self, app: &mut App) { app.add_systems(Update, spawn_enemies.run_if(in_state(AppState::InGame))) .add_systems(Update, move_enemies.run_if(in_state(AppState::InGame))) + .add_systems(Update, rotate_enemies.run_if(in_state(AppState::InGame))) .add_systems(Update, check_collisions.run_if(in_state(AppState::InGame))) .add_systems(OnExit(AppState::InGame), teardown); } @@ -57,7 +58,17 @@ fn spawn_enemies(mut commands: Commands, time: Res