//Активация следующего уровня. Ротатор позиции и запуск мяча public void BeginLevelTransition(Vector3 nextLevelPosition) { Level nextLevel = ActivateNextLevel(nextLevelPosition); LevelRotator.GetInstance().SetNewLevel(nextLevel.gameObject); LevelRotator.GetInstance().IsRotationEnabled = false; ballStartPosition = ball.transform.position; currentLevelTransitionTime = 0; isTransitioning = true; }
//Отключение предыдущего уровня private void FinishLevelTransition() { isTransitioning = false; prevLevel.Deactivate(); LevelRotator.GetInstance().IsRotationEnabled = true; }