예제 #1
0
        public bool RemoveItem(StoryItem item)
        {
            int SlotsEmptied = item.SlotsOccupied;

            SlotsFull -= SlotsEmptied;


            Items.Remove(item);
            return(true);
        }
예제 #2
0
        public bool AddItem(StoryItem item)
        {
            int SlotsRequested = item.SlotsOccupied;

            SlotsFull += SlotsRequested;

            if (SlotsFull <= MaxSlots)
            {
                Items.Add(item);
                item.LocationKey = this.KeyValue;
                return(true);
            }

            SlotsFull -= SlotsRequested;
            return(false);
        }
예제 #3
0
파일: Room.cs 프로젝트: MegaMane/Texticular
 public void AddItem(StoryItem item)
 {
     //Set the items location to this room
     item.LocationKey = this.KeyValue;
     RoomItems.Add(item);
 }