Entity render structure

This commit is contained in:
2025-11-26 18:03:13 +01:00
parent df7c547ea4
commit 5ed483a09a
3 changed files with 31 additions and 18 deletions
+1 -9
View File
@@ -1,19 +1,11 @@
use osmium::entity::Component;
pub struct Velocity(pub i32);
impl Component for Velocity {
fn tick(&mut self) {}
}
fn main() {
let mut engine = osmium::init();
engine.thread("Main.tick", || {});
let mut my_rect = engine.draw(|r| {
let mut my_rect = engine.entity(|r| {
// r.draw_rect(0, 0, 10, 10);
});
my_rect.component(Velocity(10));
}