added stop timer to add a delay after level end
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package observers
|
||||
|
||||
import (
|
||||
"openquell/components"
|
||||
|
||||
"github.com/mlange-42/arche/ecs"
|
||||
"github.com/mlange-42/arche/generic"
|
||||
)
|
||||
@@ -8,11 +10,14 @@ import (
|
||||
// Used for global game state
|
||||
type GameObserver struct {
|
||||
CurrentLevel, Width, Height, Cellsize, Score int
|
||||
StopTimer *components.Timer
|
||||
Lost bool // set to true if player is struck or something, by default: win!
|
||||
}
|
||||
|
||||
func NewGameObserver(world *ecs.World, startlevel, width, height, cellsize int) *GameObserver {
|
||||
observer := &GameObserver{
|
||||
CurrentLevel: startlevel,
|
||||
StopTimer: &components.Timer{},
|
||||
Width: width,
|
||||
Height: height,
|
||||
Cellsize: cellsize,
|
||||
|
||||
Reference in New Issue
Block a user