forked from Shardstone/trail-into-darkness
32 lines
1.1 KiB
C#
32 lines
1.1 KiB
C#
using Nox.Game;
|
|
using UnityEngine;
|
|
|
|
namespace Nox.Core {
|
|
/// <summary>
|
|
/// This class is meant to hold application essential gameplay state
|
|
/// </summary>
|
|
public class GameDataState {
|
|
public PlatformSelector platformSelector;
|
|
public string activeSessionId;
|
|
public Vector3? savedPartyPosition;
|
|
public GameState ActiveGameState { get; set; }
|
|
public PlayMode ActivePlayMode { get; set; }
|
|
public PartyDefinition ActiveParty { get; set; }
|
|
|
|
public PlayMode PreviousPlayMode { get; private set; }
|
|
|
|
public void ChangeGameState(GameState gameState) {
|
|
ActiveGameState = gameState;
|
|
}
|
|
|
|
public void ChangePlayMode(PlayMode playMode) {
|
|
if (ActiveGameState != GameState.GameMode && playMode != PlayMode.None){
|
|
Debug.LogError("Cannot change Game Mode state in any other Application State than ApplicationState.GameMode");
|
|
return;
|
|
}
|
|
PreviousPlayMode = ActivePlayMode;
|
|
ActivePlayMode = playMode;
|
|
}
|
|
}
|
|
}
|