public void removeTimer(WTimer target) { if (this.hasTimer(target)) { this.m_mapTimer.Remove(target); if (this.m_mapTimer.Count == 0) { EnterFrame.Instance.remove(this._run); } } }
public void addTimer(WTimer target) { if (!this.hasTimer(target)) { this.m_mapTimer.Add(target, true); if (!EnterFrame.Instance.exists(this._run)) { this.m_lastTime = DateTime.Now; EnterFrame.Instance.add(this._run, null); } } }
public bool hasTimer(WTimer target) { return(this.m_mapTimer.ContainsKey(target)); }