public Tips CreateTips(string info, Vector2 localPosition, Vector2 offset, float duration, Transform parent = null) { Tips tips = tipsPool.Dequeue(); tips.InitTips(IdUtil.Generate(), info, localPosition, offset, duration, parent); tipss.Add(tips.id, tips); return(tips); }
public Tips GetTips(int id) { Tips tips = (Tips)tipss[id]; if (tips == null) { return(null); } return(tips); }
public void ClearTips(int id) { Tips tips = GetTips(id); if (tips == null) { return; } tipsPool.Enqueue(tips); tipss.Remove(id); }
public void ClearAllTipss() { List <int> idList = new List <int>(); foreach (object item in tipss.Keys) { idList.Add((int)item); } foreach (int item in idList) { Tips tips = GetTips(item); if (tips == null) { return; } tipsPool.Enqueue(tips); tipss.Remove(item); } }