forked from Shardstone/trail-into-darkness
First commit on my server, yey!
This commit is contained in:
31
Assets/Code/Core/GameDataState.cs
Normal file
31
Assets/Code/Core/GameDataState.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
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 PartyData 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user