enemy movement and object pool

This commit is contained in:
2026-06-10 02:32:01 -07:00
parent 85f6a286ac
commit 2e09dbe65d
4 changed files with 81 additions and 22 deletions
+3 -3
View File
@@ -7,7 +7,7 @@ World :: struct {
base_health: int,
world_map: Map,
path: [dynamic]Vec2,
enemy: Enemy,
enemies: [MAX_ENEMIES]Enemy,
}
init_world :: proc() -> World {
@@ -27,9 +27,9 @@ update_world :: proc(world: ^World, dt: f32) {
}
if rl.IsKeyPressed(.SPACE) {
spawn_enemy(world)
spawn_group(world, 3)
}
update_enemy(world, dt)
update_enemies(world, dt)
}