Exemple #1
0
 protected override void NonInteractiveObjectCollision(NonInteractiveObject other)
 {
     //if this Player is colliding with an Item then check to see if it should be picked up
     if (input.pickupDrop && other.GetType().IsSubclassOf(typeof(Item)))
     {
         Item item = (Item)other;
         for (int i = 0; i < PlayerInput.NUM_ITEMS; i++)
         {
             if (input.items(i))
             {
                 item.Pickup(this, i);
                 return;
             }
         }
         item.Pickup(this);
     }
 }