Split crate into shared logic library and binary crate (#52)

This commit is contained in:
PROMETHIA-27
2025-06-28 16:53:40 -04:00
committed by GitHub
parent 5d00cede94
commit b93c0e4d96
64 changed files with 514 additions and 104 deletions

View File

@@ -0,0 +1,17 @@
use bevy::prelude::*;
#[derive(Component, Reflect)]
#[reflect(Component)]
pub struct AutoRotation(pub Quat);
pub fn plugin(app: &mut App) {
app.register_type::<AutoRotation>();
app.add_systems(FixedUpdate, update_auto_rotation);
}
fn update_auto_rotation(mut query: Query<(&AutoRotation, &mut Transform)>) {
for (auto_rotation, mut transform) in query.iter_mut() {
transform.rotate_local(auto_rotation.0);
}
}