Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Set ¶
func Set(key GameSceneKey, scene GameScene)
Set registers a GameScene with the given key.
func Switch ¶
func Switch(key GameSceneKey)
Switch changes the current scene to the scene with the given key.
func SwitchWith ¶
func SwitchWith(key GameSceneKey, withFunc func(GameScene))
SwitchWith changes the current scene to the scene with the given key. It also recieves a function which allows you to access the new scene.
Types ¶
type GameScene ¶
GameScene is the interface that all the game scene should implement.
Draw is the function where rendering takes place.
Update is the function where game logic updates. It is invoked before Draw.
Start is the function called every time you switch to the scene.
Stop is the function called every time you exit the scene.
Click to show internal directories.
Click to hide internal directories.