public void ShowAndFill(HeroActionEvent clone)
    {
        actionClone = clone;

        gameObject.SetActive(true);
        displayText.text = clone.GetHeroActionInfo().GetDisplayName();
        SetColor(clone.GetHeroActionInfo().GetNodeColor());
    }
Example #2
0
    public void ShowAndFill(HeroActionEvent action)
    {
        this.action = action;
        gameObject.SetActive(true);

        //Remplir information
        displayName.text = action.GetHeroActionInfo().GetDisplayName();

        SetColor(action.GetHeroActionInfo().GetNodeColor());
    }
Example #3
0
 public void BindNodeWithAction(HeroActionEvent action)
 {
     nodeRequest((Node theNode) =>
     {
         action.GetHeroActionInfo().GiveNode(theNode);
     });
 }
    void Update()
    {
        transform.position = Input.mousePosition;


        if (tempList.pointerListener.isIn)
        {
            int c = GetIndexInTempList();

            GetEmptySpot().transform.SetParent(tempList.container);
            GetEmptySpot().transform.SetSiblingIndex(c);
        }
        else if (loopList.pointerListener.isIn)
        {
            int c = GetIndexInLoopList();

            GetEmptySpot().transform.SetParent(loopList.container);
            GetEmptySpot().transform.SetSiblingIndex(c);
        }

        if (Input.GetMouseButtonDown(1))
        {
            //Cancel
            Close();
        }
        else if (Input.GetMouseButtonDown(0))
        {
            if (tempList.pointerListener.isIn)
            {
                int c = GetIndexInTempList();

                HeroActionEvent action = DeliveredEvent();

                hb.AddTemporaryActionAt(action, c);

                if (action.GetHeroActionInfo().RequiresNode())
                {
                    display.BindNodeWithAction(action);
                }

                Close();
            }
            else if (loopList.pointerListener.isIn)
            {
                int c = GetIndexInLoopList();

                HeroActionEvent action = DeliveredEvent();

                hb.AddActionAt(action, c);

                if (action.GetHeroActionInfo().RequiresNode())
                {
                    display.BindNodeWithAction(action);
                }

                Close();
            }
        }
    }
 void SharedFill()
 {
     displayName.text = existingAction.GetHeroActionInfo().GetDisplayName();
     SetColor(existingAction.GetHeroActionInfo().GetNodeColor());
 }