示例#1
0
 public void DropBag(Player player, IBagObject bagObject)
 {
     LocationBags.Add(bagObject);
     if (bagObject.GetType() == typeof(Bag))
     {
         player.Bag = null;
     }
     if (bagObject.GetType() == typeof(SmallBag))
     {
         player.SmallBag = null;
     }
 }
示例#2
0
 public void GetBag(Player player, IBagObject bagObject)
 {
     if (bagObject.GetType() == typeof(Bag))
     {
         if (player.Bag != null)
         {
             return;
         }
         player.Bag = (Bag)bagObject;
     }
     if (bagObject.GetType() == typeof(SmallBag))
     {
         if (player.SmallBag != null)
         {
             return;
         }
         player.SmallBag = (SmallBag)bagObject;
     }
     LocationBags.Remove(bagObject);
 }