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;
|
||||
|
||||
final class SceneManager {
|
||||
private static final SceneType DEFAULT_SCENE_TYPE = SceneType.SPLASH;
|
||||
|
||||
private static final EnumMap<SceneType, Scene> SCENES =
|
||||
new EnumMap<>(
|
||||
Map.of(
|
||||
@@ -12,7 +14,7 @@ final class SceneManager {
|
||||
SceneType.MENU, 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) {
|
||||
scene = SCENES.get(sType);
|
||||
|
||||
Reference in New Issue
Block a user