/// <summary> /// Removes the quick item. /// </summary> public void RemoveQuickItem() { QuickItem quickItem = GetComponentInChildren <QuickItem>(); if (quickItem != null) { quickItem.Remove(); } }
/// <summary> /// Raises the DaD group event. /// </summary> /// <param name="desc">Desc.</param> public void OnDadGroupEvent(DadCell.DadEventDescriptor desc) { switch (desc.triggerType) { case DadCell.TriggerType.DropEnd: GameObject item = desc.sourceCell.GetItem(); if (item != null) { // Create quick item from original item CreateQuickItem(item); } break; case DadCell.TriggerType.EmptyDrop: QuickItem myQuickItem = GetComponentInChildren <QuickItem>(); if (myQuickItem != null) { // Clear cell on drop quick item out of all cells myQuickItem.Remove(); } break; } }