Example #1
0
    /// <summary>
    /// 显示
    /// </summary>
    private void showText()
    {
        if (count == 0)
        {
            if (textList.Count == 0)
            {
                EnterFrame.instance.removeEnterFrame(showText);
            }
            else
            {
                GameObject prefab = AssetsManager.instance.getMainUIPrefab("popuptext") as GameObject;
                GameObject go = GameObject.Instantiate(prefab);
                RectTransform rectTF = go.transform as RectTransform;
                rectTF.SetParent(UIManager.instance.getUILayer(UILayer.PopUpLayer), false);

                PopUpText popUpText = new PopUpText();
                popUpText.init(go);
                popUpText.txt.text = textList[0];
                textList.RemoveAt(0);
            }
        }
        count = count > 100 ? 0 : count + 1;
    }