Пример #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);
        }
    }
Пример #2
0
 void OnTriggerEnter2D(Collider2D other)
 {
     if (check)
     {
         if (other.CompareTag("Player"))
         {
             check = false;
             tip.ShowTip(TipList);
         }
     }
 }
Пример #3
0
 public void ShowTip(Vector3 pos, string s)
 {
     tip.ShowTip(pos, s);
 }