private void Update() { if (startLevelPos < cameraPos.position.x && GameParameters.level < 10 && GameParameters.alive) { // Cambiar nivel GameParameters.level++; cameraC.UpdateLevelParameters(); platformC1.UpdateLevelParameters(); platformC2.UpdateLevelParameters(); characterC.UpdateLevelParameters(); levelTitleText.text = "Nivel " + GameParameters.level.ToString().PadLeft(1, '0'); GameObject.Find("LevelText").GetComponent <Text>().text = "Dificultad " + GameParameters.level.ToString().PadLeft(1, '0'); startLevelAnim.Play("PresentacionNivel"); startLevelPos += changelevelFactor * (1.0f + GameParameters.level / 9.0f); Debug.Log(cameraPos.position.x + " proximo: " + startLevelPos); GetComponent <Scores>().level = GameParameters.level; } }