Assets/Scripts/Ball.cs
/// <summary>
/// OnTriggerEnter is called when the Collider other enters the trigger.
/// </summary>
/// <param name="other">The other Collider involved in this collision.</param>
OnTriggerEnter is called when the Collider other enters the trigger.
OnTriggerEnter is called when the Collider other enters the trigger .
void OnTriggerEnter(Collider other)
   {
      switch (other.gameObject.tag)
      {
         case "ShieldCollectible":
            GameController.Instance.CollectibleHit(lastPlayerHit, P1Controller.ItemType.SHIELD);
            break;
         case "LaserCollectible":
            GameController.Instance.CollectibleHit(lastPlayerHit, P1Controller.ItemType.LASER);
            break;
         case "MissileCollectible":
            GameController.Instance.CollectibleHit(lastPlayerHit, P1Controller.ItemType.MISSILE);
            break;
         default:
            break;
      }
   }
void OnTriggerEnter ( Collider other ) { switch ( other . gameObject . tag ) { case " " : GameController . Instance . CollectibleHit ( lastPlayerHit , P1Controller . ItemType . SHIELD ) ; break ; case " " : GameController . Instance . CollectibleHit ( lastPlayerHit , P1Controller . ItemType . LASER ) ; break ; case " " : GameController . Instance . CollectibleHit ( lastPlayerHit , P1Controller . ItemType . MISSILE ) ; break ; default : break ; } }
OnTriggerEnter is called when the Collider other enters the trigger.
OnTriggerEnter is called when the Collider other enters the trigger .
other
Collider
The other Collider involved in this collision.
The other Collider involved in this collision .