mirror of
https://github.com/Kugelschieber/go-game.git
synced 2026-01-18 06:40:28 +00:00
Code restructuring.
This commit is contained in:
10
scene.go
10
scene.go
@@ -4,6 +4,11 @@ import (
|
||||
"log"
|
||||
)
|
||||
|
||||
var (
|
||||
scenes []Scene
|
||||
activeScene Scene
|
||||
)
|
||||
|
||||
// A scene used to switch between game states.
|
||||
// The Cleanup() method is called when a scene is removed
|
||||
// or the program is stopped. It can be used to cleanup open resources
|
||||
@@ -19,11 +24,6 @@ type Scene interface {
|
||||
GetName() string
|
||||
}
|
||||
|
||||
var (
|
||||
scenes []Scene
|
||||
activeScene Scene
|
||||
)
|
||||
|
||||
// Adds a scene to game.
|
||||
// Returns false if the scene exists already.
|
||||
// The first scene added will be set active.
|
||||
|
||||
Reference in New Issue
Block a user