示例#1
0
 void GetPlayersLife()//Get player's life function
 {
     if (GM.GetWinner() == 1)
     {
         if (this.tag == "Player1")
         {
             GetComponent <Text>().text = "YOU WIN";//change print text
         }
         else
         {
             GetComponent <Text>().text = "YOU LOSE";//change print text
         }
     }
     else
     {
         if (this.tag == "Player2")
         {
             GetComponent <Text>().text = "YOU WIN";//change print text
         }
         else
         {
             GetComponent <Text>().text = "YOU LOSE";//change print text
         }
     }
 }