public void LevelChanger(float playerMAX) { gunScript.StopGun(); Level = LevelDesigner.levelUp(Level); Player.instance.speed.z = LevelDesigner.speedUp(Player.instance.speed.z); Player.instance.normalSpeed = Player.instance.speed.z; if (gameMode == 0) { Debug.Log("Level Finish Has Started"); StartCoroutine(LevelEndedState(playerMAX)); } else if (gameMode == 1) { Debug.Log("Endless Finish Has Started"); StartCoroutine(LevelChangeState(playerMAX, Player.instance.speed.z)); } }