Comment updates. Sue me.

This commit is contained in:
2023-08-23 02:05:32 -04:00
parent 67e9399ad2
commit fbfe87137e

View File

@@ -47,18 +47,16 @@ func NewManager() Manager {
}
}
// ebitengine update proxy
// manages scene transition and exists, then calls scene's update method
// ebitengine update proxy on behalf of current scene
func (m *Manager) Update() error {
if m.currentScene == nil {
return nil
}
//call the current scene's update method
return m.currentScene.Update()
}
// shutdown application
func (m *Manager) Quit() {
os.Exit(0)
}
@@ -114,10 +112,12 @@ func (m *Manager) SetCurrentScene(sceneId uint) {
m.currentScene = m.scenes[sceneId]
}
// handle scene transition
func (m *Manager) TransitionScene() {
m.SetCurrentScene(m.nextSceneId)
}
// set new sceneId as the successor
func (m *Manager) SetNextScene(sceneId uint) {
m.nextSceneId = sceneId
}