示例#1
0
文件: Hello.cs 项目: icegbq/Orion
        public void HandlePacket(BaseClient client, BasePacketIn packet)
        {
            if (!(client is GameClient))
                return;
            GameClient c = client as GameClient;

            if (c.Player == null)
                return;

            int x = (int)packet.ReadInt();
            short y = (short)packet.ReadShort();
        }
示例#2
0
        public void HandlePacket(BaseClient client, BasePacketIn packet)
        {
            if (!(client is GameClient))
                return;
            GameClient c = client as GameClient;

            if (c.Player == null)
                return;

            c.Player.Rotation.X = packet.ReadInt();
            c.Player.Rotation.Y = packet.ReadInt();
            c.Player.Rotation.Z = packet.ReadInt();
        }
示例#3
0
        public void HandlePacket(BaseClient client, BasePacketIn packet)
        {
            if (!(client is GameClient))
                return;
            GameClient c = client as GameClient;

            if (c.Player == null)
                return;

            c.Player.Position.X = (float)packet.ReadInt();
            c.Player.Position.Y = (float)packet.ReadInt();
            c.Player.Position.Z = (float)packet.ReadInt();

            //Console.WriteLine(c.Index + " " + c.Player.X + " " + c.Player.Y + " " + c.Player.Z);
        }
示例#4
0
 public AbstractPacketLib(BaseClient client)
 {
     _client = client;
 }
示例#5
0
        protected virtual BaseClient onClientConnect(TcpClient tcpClient)
        {
            BaseClient client = new BaseClient(tcpClient);

            return client;
        }