Exemplo n.º 1
0
 // Update is called once per frame
 void Update()
 {
     // auto-start the game
     // TODO:
     if (GameData.singleton.currentStage == GameStage.GS_MAIN_MENU)
     {
         // testing save/load
         if (DebugOverrides.ShouldLoadSaveData && GameData.LoadGame())
         {
             Debug.Log("loaded game. resuming at " + GameData.singleton.currentStage.ToString());
             if (GameData.singleton.eventSaveData != null)
             {
                 GameEventSystem.Load(GameData.singleton.eventSaveData);
             }
             else
             {
                 Debug.LogWarning("eventSaveData was null");
             }
         }
         else
         {
             NewGame();
         }
         if (DebugOverrides.StartState.HasValue)
         {
             // TODO: figure out what functions need to be called here to make various stages somewhat functional
             // OR - just fast-forward and auto-OK until the desired state is reached
             GameData.singleton.currentStage = DebugOverrides.StartState.Value;
         }
     }
     else if (GameData.singleton.currentStage == GameStage.GS_SIMULATION && EventState.currentEvent == null)
     {
         GameData.singleton.quarterTimeElapsed += Time.deltaTime;
     }
 }