// Update is called once per frame void Update() { if (perdio && contador == 3) { texto.GetComponent <Text>().text = ""; StartCoroutine(gameOver()); } if (turno % 2 == 0 && !juega) { simonsMoves = simon.GetComponent <Simon>().generar(); simonMovesN.Add(botones[simonsMoves[cantidadTiles]].gameObject.name); cantidadTiles++; juega = true; } if (turno % 2 == 0 && juega) { playerMoves = 0; perdio = false; simon.GetComponent <Simon>().simonMove(1f); turno++; juega = false; } else { if (playerMoves == cantidadTiles) { scores++; score.GetComponent <Text>().text = "Score = " + scores; playerMoves = 0; turno++; } if (jugador.GetComponent <Player>().nombreHit != null) { if (simonMovesN[playerMoves].Equals(jugador.GetComponent <Player>().nombreHit)) { playerMoves++; } else { perdio = true; if (contador < 3) { contador++; texto.GetComponent <Text>().text += "X "; } } } } }