Beispiel #1
0
 protected override void OnDisconnected(GameSession session)
 {
     Console.WriteLine("客户端UserId:[{0}]已与服务器断开", session.RemoteAddress);
     //CharacterManager.RemoveCharacter(session.UserId);
     //CharacterManager.Recycle(session);
     DispatchCast.Send(new CastRecyclePlayer(session));
     base.OnDisconnected(session);
 }
Beispiel #2
0
        public override bool TakeAction()
        {
            var syncData = new SyncPositionData()
            {
                UserId = Current.UserId, PosX = _PosData.PosX, PosY = _PosData.PosY, PosZ = _PosData.PosZ
            };

            DispatchCast.Send(new CastSyncPlayerPosition(Current, syncData));
            return(true);
        }
Beispiel #3
0
        public override bool TakeAction()
        {
            var syncData = new SyncStateData()
            {
                UserId = Current.UserId, State = _stateData.State
            };

            DispatchCast.Send(new CastSyncPlayerState(Current, syncData));
            return(true);
        }
Beispiel #4
0
 private bool ChangePachinko(Model.PachinkoStateType stateType)
 {
     if (PachinkoManager.Inst.ChangePachinkoState(Current, _reqData.PachinkoId, stateType))
     {
         DispatchCast.Send(new CastChangePachinkoState(Current, _reqData.PachinkoId));
         return(true);
     }
     else
     {
         return(false);
     }
 }
Beispiel #5
0
 public override bool TakeAction()
 {
     DispatchCast.Send(new CastSpawnPlayer());
     return(true);
 }