コード例 #1
0
        public void GenericCommandRequest(IOutBitStream bitstream, GenericCommandRequest data)
        {
            var converted_name = coherenceToUnityConverters.FromUnityFixedString64(data.name);

            bitstream.WriteShortString(converted_name);
            bitstream.WriteIntegerRange(data.paramInt1, 15, -9999);
            bitstream.WriteIntegerRange(data.paramInt2, 15, -9999);
            bitstream.WriteIntegerRange(data.paramInt3, 15, -9999);
            bitstream.WriteIntegerRange(data.paramInt4, 15, -9999);
            var converted_paramFloat1 = coherenceToUnityConverters.FromUnityfloat(data.paramFloat1);

            bitstream.WriteFixedPoint(converted_paramFloat1, 24, 2400);
            var converted_paramFloat2 = coherenceToUnityConverters.FromUnityfloat(data.paramFloat2);

            bitstream.WriteFixedPoint(converted_paramFloat2, 24, 2400);
            var converted_paramFloat3 = coherenceToUnityConverters.FromUnityfloat(data.paramFloat3);

            bitstream.WriteFixedPoint(converted_paramFloat3, 24, 2400);
            var converted_paramFloat4 = coherenceToUnityConverters.FromUnityfloat(data.paramFloat4);

            bitstream.WriteFixedPoint(converted_paramFloat4, 24, 2400);
            bitstream.WriteBool(data.paramBool1);
            bitstream.WriteBool(data.paramBool2);
            bitstream.WriteBool(data.paramBool3);
            bitstream.WriteBool(data.paramBool4);
            bitstream.WriteEntity(data.paramEntity1);
            bitstream.WriteEntity(data.paramEntity2);
            bitstream.WriteEntity(data.paramEntity3);
            bitstream.WriteEntity(data.paramEntity4);
            var converted_paramString = coherenceToUnityConverters.FromUnityFixedString64(data.paramString);

            bitstream.WriteShortString(converted_paramString);
        }
コード例 #2
0
        public void WorldPositionQuery(IOutBitStream bitstream, WorldPositionQuery data)
        {
            var converted_position = coherenceToUnityConverters.FromUnityfloat3(data.position);

            bitstream.WriteVector3f(converted_position, 24, 2400);
            var converted_radius = coherenceToUnityConverters.FromUnityfloat(data.radius);

            bitstream.WriteFixedPoint(converted_radius, 24, 2400);
        }
コード例 #3
0
        public void GenericFieldFloat9(IOutBitStream bitstream, GenericFieldFloat9 data)
        {
            var converted_number = coherenceToUnityConverters.FromUnityfloat(data.number);

            bitstream.WriteFixedPoint(converted_number, 24, 2400);
        }