Пример #1
0
 public void load(PhaseManagerData phaseManagerData)
 {
     Debug.Log("Loading... PhaseManager");
     _timeManager = GetComponent <TimeManager>();
     _timeManager._onTimeStateChange += handleOnTimeStateChange;
     _phaseActions = JSONLoader.readPhaseActions();
     m_phasesInfo  = JSONLoader.readPhaseInfo();
     _currentPhase = phaseManagerData.CurrentPhase;
     _lastPhase    = phaseManagerData.LastPhase;
 }
Пример #2
0
 void Start()
 {
     if (!PlayerPrefs.HasKey("LoadData") || PlayerPrefs.GetInt("LoadData") == 0)
     {
         _phaseActions = JSONLoader.readPhaseActions();
         m_phasesInfo  = JSONLoader.readPhaseInfo();
         _currentPhase = (TypeFase)determinePhase();
         if (_currentPhase != TypeFase.PREWORK_I)
         {
             _lastPhase = (TypeFase)DeterminePreviousPhase(_currentPhase);
         }
     }
 }