Ejemplo n.º 1
0
    public void ShowTips(string content, float delayHideTime = 1)
    {
        int  count   = allTips.Count;
        bool hasShow = false;

        for (int i = 0; i < count; i++)
        {
            Tip tempTip = allTips[i];
            if (tempTip.tipIsUse)
            {
                tempTip.CrowdUp();
            }
            else
            {
                if (hasShow)
                {
                    continue;
                }
                else
                {
                    hasShow = true;
                    tempTip.ShowTip(content, delayHideTime);
                }
            }
        }
        if (!hasShow)
        {
            Tip newTip = new Tip(Instantiate(tips, tips.transform.parent), this);
            newTip.ShowTip(content, delayHideTime);
            allTips.Add(newTip);
        }
    }