public Problem(SourceType source, string url, int number, string title, string statement, DifficultType difficult, string code) { Source = source; Url = url; Number = number; Title = title; Statement = statement; Difficult = difficult; Code = code; }
public void Show(DifficultType difficult) { HideAllIcons(); switch (difficult) { case DifficultType.MORE_COLORS: MoreColors.SetActive(true); texto.text = LanguageManager.Instance.GetTextValue("game.difficulty.moreballs"); break; case DifficultType.SPEEDUP: SpeedUp.SetActive(true); texto.text = LanguageManager.Instance.GetTextValue("game.difficulty.speedup"); break; case DifficultType.SWITCH_REVERSE: ReverseDirection.SetActive(true); texto.text = LanguageManager.Instance.GetTextValue("game.difficulty.reversedir"); break; case DifficultType.SWITCH_REVERSE_CANCEL: ReverseDirectionCancel.SetActive(true); texto.text = LanguageManager.Instance.GetTextValue("game.difficulty.reversedircancel"); break; case DifficultType.SWITCH_CRAZY_SPEED: CrazySpeed.SetActive(true); texto.text = LanguageManager.Instance.GetTextValue("game.difficulty.crazyspeed"); break; case DifficultType.SWITCH_CRAZY_SPEED_CANCEL: CrazySpeedCancel.SetActive(true); texto.text = LanguageManager.Instance.GetTextValue("game.difficulty.crazyspeedcancel"); break; } animator.SetTrigger("start"); }
void LevelUp() { DifficultType difficult = DifficultType.NONE; CurrentLevel++; if (difficultyStepsQueue.Count == 0) { if (score % 15 == 0) { difficult = !rotator.canUseCrazySpeed ? DifficultType.SWITCH_CRAZY_SPEED : DifficultType.SWITCH_CRAZY_SPEED_CANCEL; } else if (score % 10 == 0) { difficult = DifficultType.SPEEDUP; } else if (score % 5 == 0) { difficult = !rotator.canInverseDir ? DifficultType.SWITCH_REVERSE : DifficultType.SWITCH_REVERSE_CANCEL; } } else { pointsRequiredToLevelUpQueue.Dequeue(); difficult = difficultyStepsQueue.Dequeue(); } switch (difficult) { case DifficultType.MORE_COLORS: spawner.AddColorsInGame(1); AudioMaster.instance.Play(SoundDefinitions.SFX_SPEED); break; case DifficultType.SPEEDUP: rotator.RotationSpeed += 25; AudioMaster.instance.Play(SoundDefinitions.SCRATCH_7); break; case DifficultType.SWITCH_REVERSE: rotator.StartInverseDirection(); //canInverseDir = true; AudioMaster.instance.Play(SoundDefinitions.SFX_REVERSE); break; case DifficultType.SWITCH_REVERSE_CANCEL: rotator.StopInverseDirection(); //canInverseDir = false; AudioMaster.instance.Play(SoundDefinitions.SFX_REVERSE); break; case DifficultType.SWITCH_CRAZY_SPEED: rotator.StartCrazySpeed(); AudioMaster.instance.Play(SoundDefinitions.SCRATCH_10); break; case DifficultType.SWITCH_CRAZY_SPEED_CANCEL: rotator.StopCrazySpeed(); AudioMaster.instance.Play(SoundDefinitions.SCRATCH_10); break; } levelUp.Show(difficult); //Debug.LogFormat ("<color=green>Level {0} a los {1} puntos -> Dificultad añadida: {2}</color>", currentLevel, score, difficult.ToString ()); }