internal void SendItemDropped(Section section, Cell cell) { var eventArgs = new DropEventArgs(section, cell); ItemDropped?.Invoke(this, eventArgs); ItemDroppedCommand?.Execute(eventArgs); }
public virtual async Task DropItemAsync(IGame game, IItem item) { await Map.AddItemAsync(item); _items.Remove(item); await item.MarkAsDroppedAsync(this); if (ItemDropped != null) { await ItemDropped.Invoke(item, this); } }
protected override void OnExternalObjectsDropped(GoInputEventArgs evt) { if (Selection.Primary is KanbanItem node && node.Document is GoDocument doc) { RemoveItem?.Invoke(node.Item); AddNode(node); ItemDropped?.Invoke(node.Item); node.Container = ContainerId; RefreshNodes(); } }
/// <summary> /// Pushes an item onto the stack. /// </summary> /// <param name="item">The new item.</param> public void Push(T item) { // if the stack is full notify that the bottom item is being dropped. if (m_count == m_items.Length) { ItemDropped?.Invoke(m_items[m_top]); } else { m_count++; } m_items[m_top] = item; m_top = (m_top + 1) % m_items.Length; }
public void Clear() { inventory.Clear(); HasItems = false; ItemDropped?.Invoke(); }
public static void OnItemDropped(InventoryItem drop) => ItemDropped?.Invoke(drop);