Пример #1
0
    /// <summary> 显示中间向上飘提示信息</summary>
    public static void ShowCenterMoveUpInfo(string content, Color color, float timer = 1.5f, int fontsize = 16)
    {
        if (TipsList.Count >= 5)
        {
            return;
        }

        for (int i = 0; i < TipsList.Count; i++)
        {
            UITipsView tip = TipsList[i];
            if (tip != null && tip.TipPos == UITipsView.TipPosType.Center)
            {
                Vector3 localPos = tip.transform.localPosition;
                tip.transform.localPosition = localPos + new Vector3(0, 25, 0);
            }
        }

        UITipsView tips = UIPool.Instance.PopUITipPanel();

        if (tips != null)
        {
            tips.gameObject.SetActive(true);
            tips.ShowCenterMoveUpTips(content, timer, color);
            tips.SizeTipSize(fontsize);
        }
    }
Пример #2
0
    /// <summary> 显示中间提示信息</summary>
    public static void ShowCenterInfo(string content, Color color, float timer = 1.5f)
    {
        UITipsView tips = UIPool.Instance.PopUITipPanel();

        if (tips != null)
        {
            tips.gameObject.SetActive(true);
            tips.ShowCenterTips(content, timer, color);
            tips.SizeTipSize(16);
        }
    }
Пример #3
0
    public static void ShowCenterTipsBig(string content, Color color, float timer = 1.5f)
    {
        UITipsView tips = UIPool.Instance.PopUITipPanel();

        if (tips != null)
        {
            CenterTips = tips;
            tips.CacheTrans.localPosition = new Vector3(0, 200, 0);
            tips.gameObject.SetActive(true);
            tips.ShowCenterTips(content, timer, color);
            tips.SizeTipSize(18, 32);
        }
    }
Пример #4
0
    public static void ShowCenterMoveUpInfo2(string content, List <UITipsView> list, float delay, Color color, float duration = 1.5f)
    {
        UITipsView tips = list.Count >= 3 ? list[0] : UIPool.Instance.PopUITipPanel();

        if (list.Count >= 3)
        {
            list.RemoveAt(0);
        }
        if (tips != null)
        {
            tips.gameObject.SetActive(true);
            tips.ShowCenterMoveUpTips(content, list, delay, duration, color);
            tips.SizeTipSize(16);
        }
    }
Пример #5
0
    /// <summary>
    /// 显示底端信息提示
    /// </summary>
    /// <param name="content"></param>
    /// <param name="color"></param>
    /// <param name="timer"></param>
    public static void ShowTips(string content, Color color, float timer = 1.5f)
    {
        if (TipsList.Count >= 5)
        {
            return;
        }
        UITipsView tips = UIPool.Instance.PopUITipPanel();

        if (tips != null)
        {
            tips.gameObject.SetActive(true);
            tips.ShowTips(content, timer, color, false);
            tips.SizeTipSize(16);
        }
    }
Пример #6
0
    /// <summary>
    ///显示右下角的提示
    /// </summary>
    /// <param name="content"></param>
    /// <param name="timer"></param>
    public static void ShowRightInfo(string content, float timer = 3f)
    {
        if (GameTipsList.Count >= 5)
        {
            foreach (var i in GameTipsList)
            {
                if (i.TipPos == UITipsView.TipPosType.Right)
                {
                    i.ImmediatelyBeginAlpha(true);
                }
                break;
            }
        }
        UITipsView tips = UIPool.Instance.PopUITipPanel();

        if (tips != null)
        {
            tips.transform.localPosition = new Vector3(400, -85, 0);
            tips.gameObject.SetActive(true);
            tips.ShowTips(content, timer, Color.white, true, UITipsView.TipPosType.Right);
            tips.SizeTipSize(24);
        }
    }