Пример #1
0
 public void Read(NetDataReader reader)
 {
     origin         = reader.GetVector3();
     force          = reader.GetVector3();
     forceFallof    = reader.GetFloat();
     bodyPartFactor = reader.GetFloatArray();
 }
Пример #2
0
        public void WriteReadFloatArray()
        {
            var ndw = new NetDataWriter();

            ndw.PutArray(new[] { 1.1f, 2.2f, 3.3f, 4.4f, float.MaxValue, float.MinValue });

            var ndr            = new NetDataReader(ndw.Data);
            var readFloatArray = ndr.GetFloatArray();

            Assert.That(
                new[] { 1.1f, 2.2f, 3.3f, 4.4f, float.MaxValue, float.MinValue },
                Is.EqualTo(readFloatArray).AsCollection);
        }