/// <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(); } } }