This commit is contained in:
SimonFJ20 2024-04-08 13:47:19 +02:00
parent 0dc18414f1
commit 3beca27b67

View File

@ -35,7 +35,8 @@ impl System for PlayerRenderer {
for id in ctx.entities_with_component::<Player>() {
let &mut Position(x, y) = ctx.entity_component::<Position>(id);
let player = ctx.entity_component::<Player>(id);
let sprite = player.sprite.clone().unwrap();
let sprite = player.sprite.unwrap();
ctx.draw_sprite(&sprite, x, y)?;
}
Ok(())