/// <summary> /// Queue state to process for the future /// </summary> public void QueueEvent(string state, double time, Action <QueuedEvent> action, Dictionary <object, object> attributes = null) { if (EventQueue.ContainsKey(state)) { EventQueue.Remove(state); } EventQueue.TryAdd(state, new QueuedEvent(state, action, RoomTaskManager.GetProcessTime(time), attributes)); }
public override void OnTickComplete() { if (!EventQueue.ContainsKey(PlayerAttribute.TYPING_STATUS)) { QueueEvent(PlayerAttribute.TYPING_STATUS, 1.0, ProcessTypingStatus, null); } if (!EventQueue.ContainsKey(PlayerAttribute.EFFECT_EXPIRY)) { QueueEvent(PlayerAttribute.EFFECT_EXPIRY, 1.0, ProcessEffectExpiry, null); } TicksTimer = RoomTaskManager.GetProcessTime(0.5); }