Refactor to use better interfaces and event callbacks.
This commit is contained in:
12
gamedata/enemystates.go
Normal file
12
gamedata/enemystates.go
Normal file
@@ -0,0 +1,12 @@
|
||||
package gamedata
|
||||
|
||||
type EnemyState int
|
||||
|
||||
const (
|
||||
EnemyStateDefault = iota
|
||||
EnemyStateHit
|
||||
EnemyStateDying
|
||||
EnemyStateExploding
|
||||
EnemyStateDead
|
||||
EnemyStateMax
|
||||
)
|
||||
11
gamedata/gameevents.go
Normal file
11
gamedata/gameevents.go
Normal file
@@ -0,0 +1,11 @@
|
||||
package gamedata
|
||||
|
||||
type GameEvent int
|
||||
|
||||
const (
|
||||
GameEventPlayerDeath = iota
|
||||
GameEventCharge
|
||||
GameEventNewShot
|
||||
GameEventTargetHit
|
||||
GameEventExplosion
|
||||
)
|
||||
12
gamedata/gameinputs.go
Normal file
12
gamedata/gameinputs.go
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user