Exemple #1
0
 public void reset()
 {
     for (int i = 0; i < pawns.Length; i++)
     {
         pawn pw = pawns[i].GetComponent <pawn> ();
         pawns [i].transform.position = pw.initial;
         pw.reset();
         name     = null;
         playerID = 0;
         human    = false;
         for (int j = 0; j < pawnActive.Length; j++)
         {
             pawnActive[j] = false;
         }
     }
 }
Exemple #2
0
 public void killPawns(Player[] player, int currentID)
 {
     for (int j = 0; j < player.Length; j++)
     {
         if (j != currentID)
         {
             GameObject[] p = player [j].pawns;
             for (int i = 0; i < p.Length; i++)
             {
                 pawn pwn = p [i].GetComponent <pawn> ();
                 if (pwn.distance < 56)
                 {
                     if (pwn.currentNode == selectedPawn.GetComponent <pawn> ().currentNode)
                     {
                         pwn.reset();
                         p[i].transform.position   = pwn.initial;
                         player [j].pawnActive [i] = false;
                     }
                 }
             }
         }
     }
 }