Added default SceneType for SceneManager
This is used as the initial scene that is loaded when the SceneManager is created.
This commit is contained in:
@@ -5,6 +5,8 @@ import java.util.Map;
|
|||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
|
||||||
final class SceneManager {
|
final class SceneManager {
|
||||||
|
private static final SceneType DEFAULT_SCENE_TYPE = SceneType.SPLASH;
|
||||||
|
|
||||||
private static final EnumMap<SceneType, Scene> SCENES =
|
private static final EnumMap<SceneType, Scene> SCENES =
|
||||||
new EnumMap<>(
|
new EnumMap<>(
|
||||||
Map.of(
|
Map.of(
|
||||||
@@ -12,7 +14,7 @@ final class SceneManager {
|
|||||||
SceneType.MENU, new SplashScene(),
|
SceneType.MENU, new SplashScene(),
|
||||||
SceneType.GAME, new SplashScene()));
|
SceneType.GAME, new SplashScene()));
|
||||||
|
|
||||||
@Getter private static Scene scene = SCENES.get(SceneType.SPLASH);
|
@Getter private static Scene scene = SCENES.get(DEFAULT_SCENE_TYPE);
|
||||||
|
|
||||||
public static void setScene(SceneType sType) {
|
public static void setScene(SceneType sType) {
|
||||||
scene = SCENES.get(sType);
|
scene = SCENES.get(sType);
|
||||||
|
|||||||
Reference in New Issue
Block a user