able to spawn enemy when pressing space

This commit is contained in:
2026-06-10 02:32:01 -07:00
parent 4032a5ea76
commit d7ac123359
8 changed files with 100 additions and 7 deletions
+16
View File
@@ -0,0 +1,16 @@
package game
build_path :: proc(world_map: ^Map, path: ^[dynamic]Vec2) {
clear(path)
for y in 0 ..< MAP_H {
for x in 0 ..< MAP_W {
if world_map.tiles[y][x] == .Path {
append(
path,
Vec2{f32(x * TILE_SIZE + TILE_SIZE / 2), f32(y * TILE_SIZE + TILE_SIZE / 2)},
)
}
}
}
}