Example #1
0
    public UIbehavour GetBehavour(string name)
    {
        GameObject tmpGame    = GetGameObject(name);
        UIbehavour uIbehavour = tmpGame.GetComponent <UIbehavour>();

        if (uIbehavour != null)
        {
            return(uIbehavour);
        }
        Debug.Log("未挂载UIbehavour");
        return(null);
    }
Example #2
0
    public void AddbuttonListen(string name, UnityAction action)
    {
        UIbehavour uIbehavour = GetBehavour(name);

        if (uIbehavour != null)
        {
            uIbehavour.Addbutton(action);
        }
        else
        {
            Debug.Log("无uibehavour");
        }
    }
Example #3
0
    public void AddDragListen(string name, UnityAction <BaseEventData> action)
    {
        UIbehavour uIbehavour = GetBehavour(name);

        if (uIbehavour != null)
        {
            uIbehavour.AddDragListen(action);
        }
        else
        {
            Debug.Log("未挂载UIbehavour组件");
        }
    }