mirror of
https://github.com/mvvasilev/last_light.git
synced 2025-04-19 12:49:52 +03:00
20 lines
292 B
Go
20 lines
292 B
Go
package state
|
|
|
|
import (
|
|
"github.com/gdamore/tcell/v2"
|
|
"github.com/gdamore/tcell/v2/views"
|
|
)
|
|
|
|
type GameState interface {
|
|
OnInput(e *tcell.EventKey)
|
|
OnTick(dt int64) GameState
|
|
OnDraw(c views.View)
|
|
}
|
|
|
|
type PausableState interface {
|
|
Pause()
|
|
Unpause()
|
|
SetPaused(paused bool)
|
|
|
|
GameState
|
|
}
|