wave spawner, game phases, making game window larger
This commit is contained in:
@@ -10,12 +10,16 @@ World :: struct {
|
||||
enemies: [MAX_ENEMIES]Enemy,
|
||||
towers: [dynamic]Tower,
|
||||
events: [dynamic]Event,
|
||||
phase: Game_Phase,
|
||||
wave: int,
|
||||
spawner: Wave_Spawner,
|
||||
}
|
||||
|
||||
init_world :: proc() -> World {
|
||||
world := World {
|
||||
gold = 100,
|
||||
base_health = 20,
|
||||
phase = .Build,
|
||||
}
|
||||
init_map(&world.world_map)
|
||||
build_path(&world.world_map, &world.path)
|
||||
@@ -27,8 +31,10 @@ update_world :: proc(world: ^World, dt: f32) {
|
||||
cmd := gather_commands(world)
|
||||
execute_command(world, cmd)
|
||||
|
||||
update_wave(world, dt)
|
||||
update_enemies(world, dt)
|
||||
update_towers(world, dt)
|
||||
update_phase(world)
|
||||
process_events(world)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user