public void Emit(RocketSlot slot, SlotEvent type) { if (OnRocketSlotAction != null) { OnRocketSlotAction(slot, type); } }
private void Workshop_OnRocketSlotAction(RocketSlot slot, SlotEvent type) { if (type == SlotEvent.Activated) { Start(); } if (type == SlotEvent.Empied || type == SlotEvent.Filled) { workshop.Emit(Ready ? RocketEventsTypes.Ready : RocketEventsTypes.Incomplete); } }
private void Workshop_OnRocketSlotAction(RocketSlot slot, SlotEvent type) { if (state == StoreItemEvents.Drag) { if (type == SlotEvent.Hover) { if (slot.itemType == itemType) { this.slot = slot; } } else if (type == SlotEvent.Exit && slot == this.slot) { this.slot = null; } } }
public void OnEndDrag() { //Debug.Log (string.Format("{0}: DragEnd {1} & {2} & slot {3}", name, SlottingImage.enabled, state, slot)); if (state == StoreItemEvents.Drag) { if (slot == null) { StartCoroutine(AnimateTo(transform.position, sourcePosition.position + Noise, StoreItemEvents.Return)); slot = null; } else { slot.Item = this; StartCoroutine(AnimateTo(transform.position, slot.transform.position, StoreItemEvents.Slotted)); slot = null; } } }