public void GenericCommand(IInBitStream bitstream, ref GenericCommand data)
        {
            var name = bitstream.ReadShortString();

            data.name      = coherenceToUnityConverters.ToUnityFixedString64(name);
            data.paramInt1 = bitstream.ReadIntegerRange(15, -9999);
            data.paramInt2 = bitstream.ReadIntegerRange(15, -9999);
            data.paramInt3 = bitstream.ReadIntegerRange(15, -9999);
            data.paramInt4 = bitstream.ReadIntegerRange(15, -9999);
            var paramFloat1 = bitstream.ReadFixedPoint(24, 2400);

            data.paramFloat1 = coherenceToUnityConverters.ToUnityfloat(paramFloat1);
            var paramFloat2 = bitstream.ReadFixedPoint(24, 2400);

            data.paramFloat2 = coherenceToUnityConverters.ToUnityfloat(paramFloat2);
            var paramFloat3 = bitstream.ReadFixedPoint(24, 2400);

            data.paramFloat3 = coherenceToUnityConverters.ToUnityfloat(paramFloat3);
            var paramFloat4 = bitstream.ReadFixedPoint(24, 2400);

            data.paramFloat4  = coherenceToUnityConverters.ToUnityfloat(paramFloat4);
            data.paramBool1   = bitstream.ReadBool();
            data.paramBool2   = bitstream.ReadBool();
            data.paramBool3   = bitstream.ReadBool();
            data.paramBool4   = bitstream.ReadBool();
            data.paramEntity1 = bitstream.ReadEntity();
            data.paramEntity2 = bitstream.ReadEntity();
            data.paramEntity3 = bitstream.ReadEntity();
            data.paramEntity4 = bitstream.ReadEntity();
            var paramString = bitstream.ReadShortString();

            data.paramString = coherenceToUnityConverters.ToUnityFixedString64(paramString);
        }
        public void WorldPositionQuery(IInBitStream bitstream, ref WorldPositionQuery data)
        {
            var position = bitstream.ReadVector3f(24, 2400);

            data.position = coherenceToUnityConverters.ToUnityfloat3(position);
            var radius = bitstream.ReadFixedPoint(24, 2400);

            data.radius = coherenceToUnityConverters.ToUnityfloat(radius);
        }
Beispiel #3
0
        public uint Read(ref GenericFieldFloat9 data, IInBitStream bitstream)
        {
            var propertyMask = (uint)0;


            if (bitstream.ReadMask())
            {
                var coherenceField = bitstream.ReadFixedPoint(24, 2400);
                data.number   = coherenceToUnityConverters.ToUnityfloat(coherenceField);
                propertyMask |= 0b00000000000000000000000000000001;
            }

            return(propertyMask);
        }
Beispiel #4
0
        public uint Read(ref WorldPositionQuery data, IInBitStream bitstream)
        {
            var propertyMask = (uint)0;


            if (bitstream.ReadMask())
            {
                var coherenceField = bitstream.ReadVector3f(24, 2400);
                data.position = coherenceToUnityConverters.ToUnityfloat3(coherenceField);
                propertyMask |= 0b00000000000000000000000000000001;
            }

            if (bitstream.ReadMask())
            {
                var coherenceField = bitstream.ReadFixedPoint(24, 2400);
                data.radius   = coherenceToUnityConverters.ToUnityfloat(coherenceField);
                propertyMask |= 0b00000000000000000000000000000010;
            }

            return(propertyMask);
        }
        public void GenericFieldFloat9(IInBitStream bitstream, ref GenericFieldFloat9 data)
        {
            var number = bitstream.ReadFixedPoint(24, 2400);

            data.number = coherenceToUnityConverters.ToUnityfloat(number);
        }