cash and enemy spawnpoints

This commit is contained in:
2025-03-04 00:10:57 +01:00
parent 3c78b35a69
commit ded4c5084c
7 changed files with 148 additions and 59 deletions

16
src/cash.rs Normal file
View File

@@ -0,0 +1,16 @@
use bevy::prelude::*;
#[derive(Component, Reflect, Default)]
#[reflect(Component)]
#[require(Transform)]
pub struct Cash;
pub fn plugin(app: &mut App) {
app.add_systems(Update, rotate);
}
fn rotate(time: Res<Time>, mut query: Query<&mut Transform, With<Cash>>) {
for mut transform in query.iter_mut() {
transform.rotate(Quat::from_rotation_y(time.delta_secs()));
}
}