Ejemplo n.º 1
0
        public PlayerPositionMessage(P2PMessage msg)
        {
            playerId = msg.ReadByte();

            headPos  = msg.ReadVector3();
            lHandPos = msg.ReadVector3();
            rHandPos = msg.ReadVector3();

            headRot  = msg.ReadCompressedQuaternion();
            lHandRot = msg.ReadCompressedQuaternion();
            rHandRot = msg.ReadCompressedQuaternion();
        }
Ejemplo n.º 2
0
        public ObjectSyncMessage(P2PMessage msg)
        {
            int objCount = msg.ReadByte();

            for (int i = 0; i < objCount; i++)
            {
                objectsToSync.Add(msg.ReadByte(), Tuple.Create(msg.ReadVector3(), msg.ReadCompressedQuaternion()));
            }
        }