In Spanish:
Hola , tengo un problema en unity , estoy intentando de diseñar un sistema de cuando se llegue a una cierta puntuación en un GUIText , se termine el juego :
In English:
Hi, I have a problem with unity, I'm trying to design a system when it reaches a certain score on a GUIText, the game over
This is my code / Este es mi codigo :
#pragma strict
var texto1 : GUIText ;
function Update () {
var puntos = int.Parse(texto1.text); // This is where I get error
if ( puntos >= 10 ){
texto1.pixelOffset.x = -50 ;
texto1.pixelOffset.y = 10 ;
texto1.text = "Gracias por Jugar .. !!" ;
texto1.fontSize = 30 ;
var limite_veces = 50 ;
var veces = 0 ;
veces = veces + 1 ;
if ( veces >= limite_veces ){
Application.LoadLevel ("nivel_01") ;
}
}
}
↧