/// <summary> /// もし上限を超えていたり、下限を下回っていたら直す /// </summary> void LimitCheck() { if (FeverScore > MaxFeverScore && ModeManager.IsGameMode) { NumTimes++; MaxFeverScore *= 2; FeverScore = MaxFeverScore; Data.Write(new FeverData(NumTimes, 0, MaxFeverScore)); TreeChange.NextChange(); IncreaseScore = 0; Sound.Stop(); ModeManager.ChangeFerverMode(); UIEnabled.Unavailable(); Ferver(); } if (ModeManager.IsFerverMode) { Count += Time.deltaTime; if (FeverScore <= MinFeverScore || Count >= FeverTime) { iTween.Stop(gameObject); Count = 0; FeverScore = MinFeverScore; ModeManager.ChangeGameMode(); Sound.Stop(); UIEnabled.Enabled(); } } }
/// <summary> /// イベントの終了時の処理はここに記述してください /// </summary> protected virtual void Finish() { EventMngr = FindObjectOfType <EventManager>(); EventMngr.EventInformation.NowPlaying = false; UIEnabled.Enabled(); EventMngr.Finish(); Destroy(this.gameObject); }
/// <summary> /// 終了処理 /// </summary> public void Finish() { UIEnabled.Enabled(); foreach (var obj in HideGameObjects) { obj.SetActive(true); } ModeManager.ChangeGameMode(); }