コード例 #1
0
 void SetupEx(string item_id, string res_id, Sprite sprite, string value, UnityAction action_on_delete)
 {
     if (action_on_delete != null)
     {
         DeleteButton.onClick.RemoveAllListeners();
         DeleteButton.onClick.AddListener(action_on_delete);
         IconButton.onClick.RemoveAllListeners();
         IconButton.onClick.AddListener(() => { AddResourcePanel.Open(item_id, res_id); });
     }
     Icon.sprite = sprite;
     Value.text  = value;
 }
コード例 #2
0
    public void OnDrop(PointerEventData eventData)
    {
        string WorkItemID = Item.ID;
        string ResourceID = itemBeingDragged.ID;

        if (engine.isHaveResourceCycle(WorkItemID, ResourceID))
        {
            Message.Show("ERROR", "Resource graph cycle detected!");
        }
        else
        {
            AddResourcePanel.Open(WorkItemID, ResourceID);
        }
    }