AddInputDelegate() public method

public AddInputDelegate ( EZInputDelegate del ) : void
del EZInputDelegate
return void
Ejemplo n.º 1
0
    public void SetParent(GameObject parent)
    {
        if (!parent)
        {
            HideTooltip();
            return;
        }

        if (parent.name == "ComplexWindow")
        {
            ComplexWindow cw = parent.GetComponent <ComplexWindow>();
            if (cw != null)
            {
                cw.OpInputDelegate += ComplexWindowInputDelegate;
            }
        }
        else if (parent.name == "TreePrefab")
        {
            TreeControl tc = parent.GetComponent <TreeControl>();
            if (tc != null)
            {
                tc.OpItemInputDelegate += TreeControlInputDelegate;
            }
        }
        else
        {
            ctrlTarget = parent.GetComponent <AutoSpriteControlBase>();
            if (ctrlTarget != null)
            {
                ctrlTarget.AddInputDelegate(TTInputDelegate);
            }
        }
        curParent = parent;

        ShowTooltip(parent);

        if (CurrentTutorial.nMark == 0)
        {
            if (!CurrentTutorial.isDone)
            {
                TutorialDone();
            }
        }
    }
Ejemplo n.º 2
0
    internal void AddHollowWindow(GameObject window)
    {
        if (window == null)
        {
            return;
        }
        UIScrollList list = window.GetComponentInChildren <UIScrollList>();

        if (list != null)
        {
            list.AddInputDelegate(HollowWindowInput);
        }

        AutoSpriteControlBase baseControl = window.GetComponentInChildren <AutoSpriteControlBase>();

        if (baseControl != null)
        {
            baseControl.AddInputDelegate(HollowWindowInput);
        }
    }