/** * 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)); }
/** * 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)); }
public GetBackpackItemEvent(BackpackItem i) { name = "GetBackpackItemEvent"; item = i; }