ReadDouble() public method

public ReadDouble ( ) : double
return double
Exemplo n.º 1
0
 /// <summary>
 /// Receives the specified reader.
 /// </summary>
 /// <param name="reader">The reader.</param>
 /// <param name="version">The version.</param>
 /// <remarks></remarks>
 protected override void OnReceive(BigEndianStream reader, int version)
 {
     if (reader == null)
         throw new System.ArgumentNullException("reader");
     PositionX = reader.ReadDouble();
     PositionY = reader.ReadDouble();
     PositionZ = reader.ReadDouble();
     Radius = reader.ReadSingle();
     var records = new ExplosionRecord[RecordCount = reader.ReadInt32()];
     for (int i = 0; i < RecordCount; i++)
     {
         var record = new ExplosionRecord();
         record.OffsetX = reader.ReadByte();
         record.OffsetY = reader.ReadByte();
         record.OffsetZ = reader.ReadByte();
         records[i] = record;
     }
     Records = records;
     if (version >= 36)
     {
         VelocityX = reader.ReadSingle();
         VelocityY = reader.ReadSingle();
         VelocityZ = reader.ReadSingle();
     }
 }
Exemplo n.º 2
0
 /// <summary>
 ///   Receives the specified reader.
 /// </summary>
 /// <param name="reader"> The reader. </param>
 /// <param name="version"> The version. </param>
 /// <remarks>
 /// </remarks>
 protected override void OnReceive(BigEndianStream reader, int version)
 {
     if (reader == null)
         throw new ArgumentNullException("reader");
     PositionX = reader.ReadDouble ();
     PositionY = reader.ReadDouble ();
     Stance = reader.ReadDouble ();
     PositionZ = reader.ReadDouble ();
     OnGround = reader.ReadBoolean ();
 }
Exemplo n.º 3
0
            public static PropertyData Read(BigEndianStream stream)
            {
                var data = new PropertyData
                    {
                        Key = stream.ReadString16(),
                        Value = stream.ReadDouble(),
                        InnerData = new List<ModifierData>()
                    };

                var length = stream.ReadInt16();
                for (int i = 0; i < length; i++)
                {
                    data.InnerData.Add(ModifierData.Read(stream));
                }
                return data;
            }
Exemplo n.º 4
0
 public static ModifierData Read(BigEndianStream stream)
 {
     return new ModifierData
         {
             Id = new Uuid(stream),
             Amount = stream.ReadDouble(),
             Operation = stream.ReadByte()
         };
 }