Imrpoved component structure

This commit is contained in:
2025-11-26 22:05:39 +01:00
parent 7096849b65
commit 3f07ca0ff6
5 changed files with 93 additions and 9 deletions
+4
View File
@@ -10,6 +10,10 @@ impl Component for Velocity {
apply_velocity(tick, self.0.x, &mut position.x);
apply_velocity(tick, self.0.y, &mut position.y);
}
fn as_any_mut(&mut self) -> &mut dyn std::any::Any {
self
}
}
fn apply_velocity(tick: u16, velocity: i32, x: &mut u16) -> bool {