IEnumerator TimerCor() { while (GameTimer > 0) { _timerText.text = "" + ((int)GameTimer); _timerLine.localScale = new Vector3((GameTimer / 30.0f), 1, 1); //_timerLine.localScale = new Vector3(GameTimer/(30.0f-(GlobalLevel*3)),1,1); GameTimer -= GamePaused ? 0 : Time.deltaTime; yield return(new WaitForEndOfFrame()); } ///Время кончилось GameTimer = 0; BlockControll = true; _trueVariantOfElement.MarkeredLine(); _resultText.InvokeFade("Время вышло!"); //GlobalLevel = 0; MainLevel -= 2; if (MainLevel < 0) { MainLevel = 0; } PointLevel = 0; foreach (var point in _points) { point.InvokeFadeOut(); } StartCoroutine(StartNewLevel()); }