예제 #1
0
파일: GLScene.cs 프로젝트: gl-game/glgame
        public void DropBag(IBagObject bagObj)
        {
            if (bagObj.GetType() == typeof(City) || bagObj.GetType() == typeof(Country) || bagObj.GetType() == typeof(District) || bagObj.GetType() == typeof(ObjectBuilding))
            {
                return;
            }
            var l = (Room)data.CurrentLocation;

            l.DropBag(GetPlayer(), bagObj);
        }
예제 #2
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;
     }
 }
예제 #3
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);
 }