private void InitResearching(CharacterResearching researching) { if (researching == null) { _researchingSlot.LoadEmpty(); } else if (researching.Id == 0) { _researchingSlot.LoadEmpty(); } else { _researchingSlot.LoadResearch(researching); } }
public void OnDrop(PointerEventData eventData) { ItemData draggedItem = eventData.pointerDrag.GetComponent <ItemData>(); ResearchSlot draggedResearch = eventData.pointerDrag.GetComponent <ResearchSlot>(); if (draggedItem == null && draggedResearch == null) { return; } if (draggedResearch != null) { if (draggedResearch.ReadyToUse()) { ResearchSlot researchingSlot = ResearchSlot.Instance(); ConsumeResearch(draggedResearch); researchingSlot.LoadEmpty(); } return; } ConsumeItem(draggedItem); }