Refactor to use better interfaces and event callbacks.

This commit is contained in:
2024-11-15 16:11:45 -05:00
parent 4ced75d66c
commit cbc4ba5eb3
16 changed files with 1009 additions and 14 deletions
+12
View File
@@ -0,0 +1,12 @@
package gamedata
type EnemyState int
const (
EnemyStateDefault = iota
EnemyStateHit
EnemyStateDying
EnemyStateExploding
EnemyStateDead
EnemyStateMax
)
+11
View File
@@ -0,0 +1,11 @@
package gamedata
type GameEvent int
const (
GameEventPlayerDeath = iota
GameEventCharge
GameEventNewShot
GameEventTargetHit
GameEventExplosion
)
+12
View File
@@ -0,0 +1,12 @@
package gamedata
type GameInputs struct {
XAxis float64
YAxis float64
ShotAngle float64
Shot bool
Start bool
Charge bool
Quit bool
Reset bool
}