make enemy move

This commit is contained in:
2026-06-10 02:32:01 -07:00
parent d7ac123359
commit 85f6a286ac
5 changed files with 54 additions and 7 deletions
+8
View File
@@ -18,6 +18,14 @@ render_world :: proc(world: ^World) {
if world.enemy.active {
e := world.enemy
rl.DrawCircle(i32(e.position.x), i32(e.position.y), 11, rl.MAROON)
rl.DrawText(
fmt.ctprintf("%d", e.health),
i32(e.position.x) - 4,
i32(e.position.y) - 18,
12,
rl.WHITE,
)
}
rl.DrawText(fmt.ctprintf("Gold: %d", world.gold), 10, 10, 20, rl.BLACK) // Gold HUD
rl.DrawText(fmt.ctprintf("Base HP: %d", world.base_health), 10, 32, 20, rl.BLACK) // HP HUD