コード例 #1
0
 public static void Trigger(InventoryEventType eventType, InventorySlot slot, string targetInventoryName, InventoryItem eventItem, int quantity, int index)
 {
     e.InventoryEventType = eventType;
     e.Slot = slot;
     e.TargetInventoryName = targetInventoryName;
     e.EventItem           = eventItem;
     e.Quantity            = quantity;
     e.Index = index;
     EventManager.TriggerEvent(e);
 }
コード例 #2
0
        public int                Index;               // the index inside the inventory at which the event happened

        public InventoryEvent(InventoryEventType eventType, InventorySlot slot, string targetInventoryName, InventoryItem eventItem, int quantity, int index)
        {
            InventoryEventType = eventType;
            Slot = slot;
            TargetInventoryName = targetInventoryName;
            EventItem           = eventItem;
            Quantity            = quantity;
            Index = index;
        }