private async Task When(LeaveCommand cmd) { _applications[_roomName].Execute(cmd); await _group.RemoveAsync(Context); _disposables.Dispose(); }
void PathPointNode_MouseLeave(object sender, MouseEventArgs e) { if (LeaveCommand != null) { LeaveCommand.Execute(this); } e.Handled = true; }
public void leaveParty() { LeaveCommand cmd = new LeaveCommand(); cmd.type = (int)CommandType.LEAVE; cmd.party = curParty; cmd.player = curPlayer; string jsonCmd = JsonUtility.ToJson(cmd); currentSocket.Send(jsonCmd); }
private void When(LeaveCommand cmd) { Update(_roomName, world => world.RemovePlayer(cmd.PlayerId)); }