public void Sleep(float duration, object id, bool extendCurrentSleep = false) { if (!this.LastSleepTickDictionary.ContainsKey(id)) { this.LastSleepTickDictionary.Add(id, Utils.TickCount + duration); return; } if (extendCurrentSleep && this.LastSleepTickDictionary[id] > Utils.TickCount) { this.LastSleepTickDictionary[id] += duration; return; } this.LastSleepTickDictionary[id] = Utils.TickCount + duration; }