public virtual void Reset() { ResetCore(); Controller = null; LastSentCommandTick = Tick.START; IsFrozen = true; // Entities start frozen on client ShouldBeFrozen = true; IncomingStates.Clear(); { // DrainQueue while (OutgoingCommands.Count > 0) { var val = OutgoingCommands.Dequeue(); val.Pool.Deallocate(val); } } AuthTick = Tick.START; NextTick = Tick.INVALID; { //ResetStates(); if (AuthStateBase != null) { AuthStateBase.Pool.Deallocate(AuthStateBase); } if (NextStateBase != null) { NextStateBase.Pool.Deallocate(NextStateBase); } AuthStateBase = null; NextStateBase = null; } }
public Task SendCommandAsync(Command command, CancellationToken cancellationToken) => OutgoingCommands.SendAsync(command);