public static int AddTimer(CallBackFun fun, float intervalTime, int time = 1) { TimeItem item = GetTimer(fun); if (item != null) { RemoveTimer(item); } if (_idles.Count > 0) { item = _idles[0]; _idles.RemoveAt(0); item.Reset(fun, RemoveTimer, intervalTime, time); } else { item = TimeItem.Init(fun, RemoveTimer, intervalTime, time); } _items.Add(item); return(item.id); }