示例#1
0
    public static UIResearchAttribute Create(bool bAdvisorDoIt = false)
    {
        GameObject          go     = Instantiate(MtAssetBundles.Load(prefabPath) as GameObject);
        UIResearchAttribute window = UIWindow.Create <UIResearchAttribute>(go, GetCanvasCenter(), true);

        window.bAdvisorDoIt = bAdvisorDoIt;

        if (bAdvisorDoIt)
        {
            window.transform.localPosition = UIUtility.UnMeaningPosition;
        }

        singleton = window;

        return(window);
    }
示例#2
0
    public static UIQuestBox Create(int top = 320)
    {
        if (singleton == null)
        {
            Transform  parent = FindBottomParent();
            GameObject go     = Instantiate(MtAssetBundles.Load("prefab/ui/quest/" + PrefabPath)) as GameObject;

            singleton = Create <UIQuestBox>(go, parent);
            singleton.InitializeOnce();
        }

        singleton.transform.SetParent(UIKingdomInfo.Get().uiQuestBoxParentTrs);

        RectTransform rect = singleton.GetComponent <RectTransform>();

        rect.anchoredPosition = Vector2.zero;//new Vector2(10, top);
        singleton.transform.SetAsFirstSibling();

        //singleton.transform.SetParent(FindHeaderParent());

        //singleton.questList = AccountInfo.instance.questList;

        return(singleton);
    }