Exemple #1
0
 void OnTriggerExit(Collider other)
 {
     if (other.tag == "Player")
     {
         Character    player         = other.gameObject.GetComponentInParent <Character>();
         ShipMovement playerMovement = other.gameObject.GetComponentInParent <ShipMovement>();
         if (player.playerEnum != owningPlayer)
         {
             //Slow the player while in the beam
             playerMovement.RestoreSpeed();
         }
     }
 }