public State_StartDecay(GameInfo info) : base(info) { NextState = new State_MainDecay(info); Name = STATE.DECAY_START; SecondsToStateChange = GlobalSettingsManager.GetStateTime(this.Name); this.SecondsToSpawnTrash = 2f; }
AbstractState CreateStartState() { AbstractState ret = new State_Alive(gameInfo); switch (GlobalSettingsManager.firstState) { case STATE.NONE: Debug.LogError(new ArgumentException("There was no start state set in the GlobalSettingsManager. Check Controller -> GameState Object in Scene", "startState")); ret = null; break; case STATE.NATURE: break; case STATE.DECAY_START: ret = new State_StartDecay(gameInfo); break; case STATE.DECAY_MAIN: ret = new State_MainDecay(gameInfo); break; case STATE.TRASH_RISING: ret = new State_TrashRising(gameInfo); break; case STATE.FINAL: ret = new State_DeadNature(gameInfo); break; } return(ret); }