예제 #1
0
 private void InitResearching(CharacterResearching researching)
 {
     if (researching == null)
     {
         _researchingSlot.LoadEmpty();
     }
     else if (researching.Id == 0)
     {
         _researchingSlot.LoadEmpty();
     }
     else
     {
         _researchingSlot.LoadResearch(researching);
     }
 }
예제 #2
0
    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);
    }