private void InitializeGame() { difficulty = DataController.GetDifficulty(); //Setting game time int time = 4 + Math.Min(3, difficulty); timer.SetTime(time); }
private void TuneTime(int difficulty) { if (difficulty > 8) { timer.SetTime(15f - ((difficulty - 8))); if (timer.seconds < shortestPossibleTimeWithMapMovement) { timer.SetTime(shortestPossibleTimeWithMapMovement); } } else { timer.SetTime(timer.seconds - (difficulty / (2 * steps)) * (timer.seconds - shortestPossibleTime)); if (timer.seconds < shortestPossibleTime) { timer.SetTime(shortestPossibleTime); } } }
private void SetupTimer(int difficulty) { TimeProgress timer = FindObjectOfType <TimeProgress>(); float time; //input the number of seconds you want to have per level switch (difficulty) { case 1: time = 10f; break; case 2: time = 8.5f; break; case 3: time = 10f; break; case 4: time = 8.5f; break; case 5: time = 10f; break; case 6: time = 10f; break; case 7: time = 10f; break; case 8: time = 8.5f; break; case 9: time = 7.5f; break; case 10: time = 6f; break; default: time = 5f; break; } timer.SetTime(time); }
public void Configure(int difficulty) { if (!initialized) { Initialize(); } if (overrideDifficulty) { difficulty = forcedDifficulty; } timer.SetTime(Mathf.Max(12f - difficulty * 2f, 4.5f)); }
void Start() { endedGame = false; damage = 0; miniGameLogic = GameObject.FindObjectOfType <MinigameLogic>(); borders = GameObject.FindGameObjectsWithTag("Border"); jumpmanList = GameObject.FindGameObjectsWithTag("Jumpman"); supportRope = GameObject.Find("SupportRope"); infoText = GameObject.Find("InfoText"); brokenRope = GameObject.Find("BrokenSupportRopes"); brokenRope.SetActive(false); timer = FindObjectOfType <TimeProgress>(); timer.SetTime(15); }
private void InitializeGame() { //Setting initial haalari and logo this.haalari = Random.Range(0, associationAmount); haalariUpdater.ChangeImage(this.haalari); this.logo = Random.Range(0, associationAmount); logoUpdater.ChangeImage(this.logo); int time = 12 - DataController.GetDifficulty(); if (time < 3) { time = 3; } timer.SetTime(time); }