Beispiel #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);
        }
    }
Beispiel #2
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);
        }
    }