Example #1
0
    public static T Attach <T>(Transform toTrans, bool useAnim = true) where T : UIWorldBase
    {
        T template = TResources.Instantiate <T>("UI/World/" + typeof(T).ToString(), toTrans);

        template.Init(useAnim);
        return(template);
    }
    public static UIPageBase Generate(Type type, Transform parentTransform)
    {
        UIPageBase page = TResources.Instantiate <UIPageBase>("UI/Pages/" + type.ToString(), parentTransform);

        page.Init();
        return(page);
    }
Example #3
0
    public static T Show <T>(Transform _parentTrans) where T : UIControlBase
    {
        T tempBase = TResources.Instantiate <T>("UI/Controls/" + typeof(T).ToString(), _parentTrans);

        tempBase.Init();
        return(tempBase);
    }
Example #4
0
    public static T Show <T>(Transform _parentTrans) where T : UIMessageBoxBase
    {
        if (m_MessageBox)
        {
            Debug.LogError("Can't Open Another MessageBox While One Is Active");
            return(null);
        }

        T messageBox = TResources.Instantiate <T>("UI/MessageBoxes/" + typeof(T).ToString(), _parentTrans);

        messageBox.Init();
        return(messageBox);
    }
Example #5
0
    public static T Show <T>(Transform parentTransform, bool useAnim) where T : UIPageBase
    {
        if (Opening <T>())
        {
            return(null);
        }
        T page = TResources.Instantiate <T>("UI/Pages/" + typeof(T).ToString(), parentTransform);

        page.Init();
        page.Play(useAnim);
        m_Pages.Add(page);
        return(page);
    }