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 Persistence(IInBitStream bitstream, ref Persistence data)
        {
            var uuid = bitstream.ReadShortString();

            data.uuid = coherenceToUnityConverters.ToUnityFixedString64(uuid);
            var expiry = bitstream.ReadShortString();

            data.expiry = coherenceToUnityConverters.ToUnityFixedString64(expiry);
        }
Пример #3
0
        public uint Read(ref Persistence data, IInBitStream bitstream)
        {
            var propertyMask = (uint)0;


            if (bitstream.ReadMask())
            {
                var coherenceField = bitstream.ReadShortString();
                data.uuid     = coherenceToUnityConverters.ToUnityFixedString64(coherenceField);
                propertyMask |= 0b00000000000000000000000000000001;
            }

            if (bitstream.ReadMask())
            {
                var coherenceField = bitstream.ReadShortString();
                data.expiry   = coherenceToUnityConverters.ToUnityFixedString64(coherenceField);
                propertyMask |= 0b00000000000000000000000000000010;
            }

            return(propertyMask);
        }
Пример #4
0
        public uint Read(ref GenericFieldString4 data, IInBitStream bitstream)
        {
            var propertyMask = (uint)0;


            if (bitstream.ReadMask())
            {
                var coherenceField = bitstream.ReadShortString();
                data.name     = coherenceToUnityConverters.ToUnityFixedString64(coherenceField);
                propertyMask |= 0b00000000000000000000000000000001;
            }

            return(propertyMask);
        }
        public void GenericPrefabReference(IInBitStream bitstream, ref GenericPrefabReference data)
        {
            var prefab = bitstream.ReadShortString();

            data.prefab = coherenceToUnityConverters.ToUnityFixedString64(prefab);
        }
        public void GenericFieldString4(IInBitStream bitstream, ref GenericFieldString4 data)
        {
            var name = bitstream.ReadShortString();

            data.name = coherenceToUnityConverters.ToUnityFixedString64(name);
        }