Esempio n. 1
0
        private static void Packet_PlayerLook(int connectionID, ref byte[] data)
        {
            ByteBuffer buffer = new ByteBuffer(data);
            Player     player = GameManager.playerList[connectionID];
            Quaternion look   = new Quaternion(buffer.ReadSingle(), buffer.ReadSingle(), buffer.ReadSingle(), buffer.ReadSingle());

            MovementManager.PlayerLooking(player, look);
            buffer.Dispose();
        }
Esempio n. 2
0
        private static void Packet_PlayerMove(int connectionID, ref byte[] data)
        {
            ByteBuffer buffer   = new ByteBuffer(data);
            Player     player   = GameManager.playerList[connectionID];
            Vector3    position = new Vector3(buffer.ReadSingle(), buffer.ReadSingle(), buffer.ReadSingle());

            Console.WriteLine("move: " + connectionID + " POS: " + position);
            MovementManager.PlayerMovement(player, position);
            buffer.Dispose();
        }