Пример #1
0
        /**
         * Get a backpack item
         */
        public void GetItem(BackpackItem item)
        {
            int i = bpItems.IndexOf (item);

            if (i == -1) {
                bpItems.Add (item);
            } else {
                bpItems[i].quantity++;
            }

            EventManager.Instance.Send (new GetBackpackItemEvent (item));
        }
Пример #2
0
        /**
         * Get a backpack item
         */
        public void GetItem(BackpackItem item)
        {
            int i = bpItems.IndexOf(item);

            if (i == -1)
            {
                bpItems.Add(item);
            }
            else
            {
                bpItems[i].quantity++;
            }

            EventManager.Instance.Send(new GetBackpackItemEvent(item));
        }
Пример #3
0
 public GetBackpackItemEvent(BackpackItem i)
 {
     name = "GetBackpackItemEvent";
     item = i;
 }
Пример #4
0
 public GetBackpackItemEvent(BackpackItem i)
 {
     name = "GetBackpackItemEvent";
     item = i;
 }