Exemple #1
0
 public void switchPlayer()
 {
     if (objetoAMostrar.sprite == objetoPlayer1)
     {
         objetoAMostrar.sprite  = objetoPlayer2;
         recolectorPlayerActual = recolectorPlayer2;
         cantidadObjeto.text    = recolectorPlayer2.getRecolecciones().ToString();
     }
     else
     {
         objetoAMostrar.sprite  = objetoPlayer1;
         recolectorPlayerActual = recolectorPlayer1;
         cantidadObjeto.text    = recolectorPlayer1.getRecolecciones().ToString();
     }
 }
Exemple #2
0
 // Use this for initialization
 void Start()
 {
     recolectorPlayerActual = recolectorPlayer1;
     cantidadObjeto.text    = recolectorPlayer1.getRecolecciones().ToString();
     objetoAMostrar.sprite  = objetoPlayer1;
 }