示例#1
0
 private void OnTriggerEnter(Collider other)
 {
     if (other.name == Puck.name)
     {
         Puck.Reset();
         if (this.name.Contains("1"))
         {
             Player2.Score();
             Player1.Lose();
             Puck.PlayGoalSound();
         }
         else
         {
             Player1.Score();
             Player2.Lose();
             Puck.PlayGoalSound();
         }
     }
 }