示例#1
0
 void OnTriggerEnter(Collider collider)
 {
     // print("Collision - " + bound + " with " + collider.name);
     if (collider.GetComponent <Player>())
     {
         icon.powerup.PickUpIcon();
     }
     else if (collider.GetComponent <Bullet>())
     {
         if (collider.GetComponent <Bullet>().manager.shooterIdentity == icon.powerup.playerWhoEarnedPowerup)
         {
             icon.powerup.PickUpIcon();
         }
     }
     else
     {
         stuckPreventionTimer = 0f;
         icon.ChangeDirectionBasedOffCollider(bound);
     }
 }