public void LoadCharacter() { netSession.RpcServer.SelectCharacter(cselInfo.Selected); netClient.Disconnected += (str) => netSession.Disconnected(); netClient.Disconnected -= NetClientOnDisconnected; netClient = null; state.FadeOut(0.2, () => { state.Game.ChangeState(new NetWaitState(netSession, state.Game)); }); }
public void LoadCharacter() { netClient.SendPacket(new CharacterListActionPacket() { Action = CharacterListAction.SelectCharacter, IntArg = cselInfo.Selected }, PacketDeliveryMethod.ReliableOrdered); var session = new CGameSession(state.Game, netClient); netClient.Disconnected += (str) => session.Disconnected(); netClient.Disconnected -= NetClientOnDisconnected; netClient = null; state.FadeOut(0.2, () => { state.Game.ChangeState(new NetWaitState(session, state.Game)); }); }