add event queue, tower archetypes, and enemy damage. no projectiles yet

This commit is contained in:
2026-06-11 01:05:17 -07:00
parent dd6a5684be
commit 285b434499
4 changed files with 95 additions and 4 deletions
+25
View File
@@ -0,0 +1,25 @@
package game
Event_Kind :: enum {
Enemy_Killed,
}
Event :: struct {
kind: Event_Kind,
gold_reward: int,
}
push_event :: proc(world: ^World, kind: Event_Kind, gold_reward: int = 0) {
append(&world.events, Event{kind = kind, gold_reward = gold_reward})
}
process_events :: proc(world: ^World) {
for ev in world.events {
switch ev.kind {
case .Enemy_Killed:
world.gold += ev.gold_reward
}
}
clear(&world.events)
}