ReadSingle() 공개 메소드

Reads a single-precision floating-point value from the stream, using the bit converter for this reader. 4 bytes are read.
public ReadSingle ( ) : float
리턴 float
예제 #1
0
        protected override void Parse(EndianBinaryReader r)
        {
			Yaw = r.ReadSingle () * Math.PI / 180;
			Pitch = r.ReadSingle () * Math.PI / 180;
			OnGround = r.ReadBoolean ();
#if DEBUG
			//Console.WriteLine("P L: " + Pitch);
#endif
		}
예제 #2
0
 protected override void Parse(EndianBinaryReader r)
 {
     Target = ReadVarInt(r);
     Type = (Types)ReadVarInt(r);
     if (Type == Types.InteractAt)
     {
         TargetPos = new CoordDouble();
         TargetPos.X = r.ReadSingle();
         TargetPos.Y = r.ReadSingle();
         TargetPos.Z = r.ReadSingle();
     }
 }
        protected override void Parse(EndianBinaryReader r)
        {
            Position = new CoordDouble();
            Position.X = r.ReadDouble();
            Position.Y = r.ReadDouble();
            Position.Z = r.ReadDouble();
            Yaw = r.ReadSingle() * Math.PI / 180;
            Pitch = r.ReadSingle() * Math.PI / 180;
            OnGround = r.ReadBoolean();
#if DEBUG
            //Console.WriteLine("PPL: " + Pitch);
#endif
        }
        protected override void Parse(EndianBinaryReader r)
        {
            Position = new CoordDouble();
            Position.X = r.ReadDouble();
            Position.Y = r.ReadDouble();
            Position.Z = r.ReadDouble();
            Yaw = r.ReadSingle() * Math.PI / 180;
            Pitch = r.ReadSingle() * Math.PI / 180;
            Relative = r.ReadByte();

            //Console.WriteLine("Parsed: " + this);
            //Debug.WriteLine("Parsed: " + this);
        }
예제 #5
0
        protected override void Parse(EndianBinaryReader r)
        {
			//Console.WriteLine (BitConverter.ToString (r.ReadBytes (50)));
			this.LevelExperience = r.ReadSingle ();
            this.Level = ReadVarInt(r);
            this.TotalExperience = ReadVarInt(r);
		}
예제 #6
0
 protected override void Parse(EndianBinaryReader r)
 {
     Name = ReadString8(r);
     Position = ReadInt8(r);
     Volume = r.ReadSingle();
     Pitch = r.ReadByte();
     //Category = (SoundCategoy)r.ReadByte();
 }
예제 #7
0
 protected override void Parse(EndianBinaryReader r)
 {
     Reason = (GameState)r.ReadByte();
     Value = r.ReadSingle();
     #if DEBUGPACKET
     if (Reason.ToString() == ((int)Reason).ToString())
         throw new NotImplementedException(Reason.ToString());
     #endif
 }
예제 #8
0
 protected override void Parse(EndianBinaryReader r)
 {
     ParticleID = r.ReadInt32();
     LongDistance = r.ReadBoolean();
     Position = new CoordDouble();
     Position.X = r.ReadSingle();
     Position.Y = r.ReadSingle();
     Position.Z = r.ReadSingle();
     Size = new CoordDouble();
     Size.X = r.ReadSingle();
     Size.Y = r.ReadSingle();
     Size.Z = r.ReadSingle();
     Speed = r.ReadSingle();
     Count = r.ReadInt32();
     Debug.WriteLine(this);
 }
예제 #9
0
 protected override void Parse(EndianBinaryReader r)
 {
     Position = new CoordDouble();
     Position.X = r.ReadSingle();
     Position.Y = r.ReadSingle();
     Position.Z = r.ReadSingle();
     Radius = r.ReadSingle();
     int count = r.ReadInt32();
     Records = new Record[count];
     for (int n = 0; n < count; n++)
     {
         Records [n] = new Record();
         Records [n].X = r.ReadSByte();
         Records [n].Y = r.ReadSByte();
         Records [n].Z = r.ReadSByte();
     }
     PlayerMotion = new float[3];
     PlayerMotion [0] = r.ReadSingle();
     PlayerMotion [1] = r.ReadSingle();
     PlayerMotion [2] = r.ReadSingle();
 }
예제 #10
0
 protected override void Parse(EndianBinaryReader r)
 {
     Flags = (Abilities)r.ReadByte();
     FlySpeed = r.ReadSingle();
     WalkSpeed = r.ReadSingle();
 }
예제 #11
0
 protected override void Parse(EndianBinaryReader r)
 {
     SideWays = r.ReadSingle();
     Forward = r.ReadSingle();
     Action = (Actions)r.ReadByte();
 }
예제 #12
0
 protected override void Parse(EndianBinaryReader r)
 {
     Health = r.ReadSingle();
     Food = ReadVarInt(r);
     FoodSaturation = r.ReadSingle();
 }