コード例 #1
0
        public void Initialize()
        {
            //TODO(dwong): load from save state.

            StateList            = Resources.Load <GameStateList>("Game State Data/Game State List");
            currentGameStateData = StateList[0];
        }
コード例 #2
0
 void Update()
 {
     if (gameStateData == gameStateManager.CurrentGameStateData)
     {
         return;
     }
     gameStateData = gameStateManager.CurrentGameStateData;
     UpdateDisplay();
 }
コード例 #3
0
        public void SetGameState(GameStateData state, bool persist = false)
        {
            if (state == null)
            {
                Debug.LogError("Null game state passed in.");
                return;
            }

            currentGameStateData = state;

            OnAllReset?.Invoke();
            if (persist)
            {
                return;
            }
            OnNonpersistReset?.Invoke();
        }
コード例 #4
0
 void Awake()
 {
     gameStateData = gameStateManager.CurrentGameStateData;
     UpdateDisplay();
 }