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); } }
void OnTriggerEnter2D(Collider2D other) { if (check) { if (other.CompareTag("Player")) { check = false; tip.ShowTip(TipList); } } }
public void ShowTip(Vector3 pos, string s) { tip.ShowTip(pos, s); }