Exemplo n.º 1
0
    /// <summary>
    /// 显示提示
    /// </summary>
    /// <param name="content"></param>
    public void ShowTip(string content)
    {
        if (m_UITipView == null)
        {
            GameObject go = ResourcesManager.Instance.Load(ResourceType.UIWindow, "pan_Tip");
            go.SetParent(CurrentUIScene.Container_Center, true);
            go.transform.localPosition = Vector3.zero;
            go.transform.localScale    = Vector3.one;
            go.GetComponent <RectTransform>().sizeDelta = Vector2.zero;

            Canvas canvas = go.GetComponent <Canvas>();
            canvas.overrideSorting = true;
            canvas.sortingOrder    = 1999;

            m_UITipView = go.GetOrCreatComponent <UITipView>();
        }

        m_UITipView.ShowTip(content);
    }
Exemplo n.º 2
0
 protected override void OnAwake()
 {
     base.OnAwake();
     Instance   = this;
     m_TipQueue = new Queue <TipEntity>();
 }
Exemplo n.º 3
0
 protected override void OnAwake()
 {
     base.OnAwake();
     Instance = this;
 }