public Matcher(BstCallbacks bstCallbacks) : base(bstCallbacks) { // 注册广播 // BroadcastCallback matchTimeoutBst = new BroadcastCallback(this.matchUsersTimeoutBroadcast); // BroadcastCallback matchUserstBst = new BroadcastCallback(this.matchUsersBroadcast); this.SetBroadcastHandler(MatchTimeoutBroadcastType, this.MatchUsersTimeoutBroadcast); this.SetBroadcastHandler(MatchUsersBroadcastType, this.MatchUsersBroadcast); this.SetBroadcastHandler(CancelMatchBroadcastType, this.CancelMatchBroadcast); }
public Group(BstCallbacks bstCallbacks) : base(bstCallbacks) { // 注册广播 this.SetBroadcastHandler(this._joinGroupBstType, this.OnJoinGroup); this.SetBroadcastHandler(this._leaveGroupBstType, this.OnLeaveGroup); this.SetBroadcastHandler(this._dismissGroupBstType, this.OnDismissGroup); this.SetBroadcastHandler(this._changeGroupBstType, this.OnChangeGroup); this.SetBroadcastHandler(this._removeGroupBstType, this.OnRemoveGroupPlayer); this.SetBroadcastHandler(this._changeCustomGroupPlayerStatusBstType, this.OnChangeCustomGroupPlayerStatus); this.SetBroadcastHandler(this._recvFromGroupClientType, this.OnRecvFromGroupClient); }
public Room(BstCallbacks bstCallbacks) : base(bstCallbacks) { // 注册广播 this.SetBroadcastHandler(this._joinRoomBroadcastType, this.OnJoinRoom); this.SetBroadcastHandler(this._leaveRoomBroadcastType, this.OnLeaveRoom); this.SetBroadcastHandler(this._dismissRoomBroadcastType, this.OnDismissRoom); this.SetBroadcastHandler(this._changeRoomBroadcastType, this.OnChangeRoom); this.SetBroadcastHandler(this._removeUserBroadcastType, this.OnRemoveUser); this.SetBroadcastHandler(this._changeUserStateBroadcastType, this.OnChangeUserState); this.SetBroadcastHandler(this._roomUserNetworkBroadcastType, this.OnChangePlayerNetworkState); this.SetBroadcastHandler(this._testBroadcastType, TestBroadcast); }
public FrameSender(BstCallbacks bstCallbacks) { this._bstCallbacks = bstCallbacks; this.NetUtil1 = new BaseNetUtil(bstCallbacks); this.NetUtil2 = new BaseNetUtil(bstCallbacks); // socket1 注册广播 this.NetUtil1.SetBroadcastHandler(_startGameBroadcastType, this.OnStartFrameSync); this.NetUtil1.SetBroadcastHandler(_stopGameBroadcastType, this.OnStopFrameSync); // socket2 注册广播 this.NetUtil2.SetBroadcastHandler(_frameBroadcastType, this.OnRecvFrame); this.NetUtil2.SetBroadcastHandler(_sendMessageExtBroadcastType, this.OnRecvFromGameSvr); }
public User(BstCallbacks bstCallbacks) : base(bstCallbacks) { }
public Pinger(BstCallbacks bstCallbacks, int id, FrameSender frameSender) : base(bstCallbacks) { this.Id = id; this.FrameSender = frameSender; }
public NetClient(BstCallbacks bstCallbacks) { this._bstCallbacks = bstCallbacks; }
public Sender(BstCallbacks bstCallbacks) : base(bstCallbacks) { var bst = new BroadcastCallback(OnRecvFromClient); SetBroadcastHandler(_messageBroadcastType, bst); }
public BaseNetUtil(BstCallbacks bstCallbacks) { this.bstCallbacks = bstCallbacks; client = new NetClient(bstCallbacks); _server = new NetServer(); }