rename hud.odin to overlay.odin, add clay button to start wave

This commit is contained in:
2026-06-16 21:58:51 -07:00
parent cc71ee1286
commit d097e36419
6 changed files with 102 additions and 57 deletions
+3 -6
View File
@@ -15,6 +15,9 @@ Command :: struct {
}
gather_commands :: proc(world: ^World) -> Command {
overlay_cmd := poll_overlay_command()
if overlay_cmd.kind != .None do return overlay_cmd
if world.phase == .Build && rl.IsKeyPressed(.N) {
return Command{kind = .Start_Wave}
}
@@ -25,12 +28,6 @@ gather_commands :: proc(world: ^World) -> Command {
return Command{kind = .Place_Tower, gx = gx, gy = gy}
}
if rl.IsMouseButtonPressed(.LEFT) {
mouse := rl.GetMousePosition()
gx, gy := screen_to_grid(mouse.x, mouse.y)
return Command{kind = .Place_Tower, gx = gx, gy = gy}
}
return Command{kind = .None}
}