public override void Encode(Lidgren.Network.NetOutgoingMessage msg)
 {
     msg.Write((byte) timesDisplayed);
     msg.Write((byte) ballColor);
     msg.Write((byte) textColor);
     msg.Write((byte) textWord);
 }
Esempio n. 2
0
 /// <summary>
 /// Serialize the quaternion to the message
 /// </summary>
 /// <param name="quaternion"></param>
 /// <param name="message"></param>
 public static void Serialize(this Quaternion quaternion, Lidgren.Network.NetOutgoingMessage message)
 {
     message.Write(quaternion.x);
     message.Write(quaternion.y);
     message.Write(quaternion.z);
     message.Write(quaternion.w);
 }
Esempio n. 3
0
 /// <summary>
 /// serialize to the stream
 /// </summary>
 /// <param name="message"></param>
 public void OnSerialize(Lidgren.Network.NetOutgoingMessage message)
 {
     message.Write(quaternion.X);
     message.Write(quaternion.Y);
     message.Write(quaternion.Z);
     message.Write(quaternion.W);
 }
Esempio n. 4
0
 public override void encode(ref Lidgren.Network.NetOutgoingMessage msg)
 {
     base.encode (ref msg);
     msg.Write (pseudo);
     msg.Write(color.R);
     msg.Write(color.G);
     msg.Write(color.B);
 }
Esempio n. 5
0
 public override void encode(ref Lidgren.Network.NetOutgoingMessage msg)
 {
     base.encode (ref msg);
     msg.Write(added);
     msg.Write(position.X);
     msg.Write(position.Y);
     msg.Write(blockType);
     msg.Write(layer);
 }
 public void Encode(Lidgren.Network.NetOutgoingMessage msg)
 {
     msg.Write((short)cursorPosition.X);
     msg.Write((short)cursorPosition.Y);
     //msg.Write(Mouse.GetState().LeftButton.IsClicked());
     msg.Write((byte)status);
     if (puzzle != null)
     {
         msg.Write(puzzle.ID());
         puzzle.Encode(msg);
     }
     else
         msg.Write((byte)0);
 }
Esempio n. 7
0
 protected override void WriteData(Lidgren.Network.NetOutgoingMessage Message)
 {
     Message.Write(Parent.ToString());
     this.Code.Write(Message);
 }
Esempio n. 8
0
        public override void encode(ref Lidgren.Network.NetOutgoingMessage msg)
        {
            base.encode (ref msg);
            msg.Write (time.ToBinary ());

            msg.Write (input.Up);
            msg.Write (input.Down);
            msg.Write (input.Left);
            msg.Write (input.Right);
            msg.Write (position.X);
            msg.Write (position.Y);
            msg.Write (ticktime);
            msg.Write(eyePosition.X);
            msg.Write(eyePosition.Y);
            msg.Write(fallSpeed);
            msg.Write(layer);
            msg.Write(noclip);
        }
 public override void Encode(Lidgren.Network.NetOutgoingMessage msg)
 {
     msg.Write((byte) TeamCirclesInOrderHelper.nextToClick);
     msg.Write(buttonClicked); // buttonClicked = 255;
     if (buttonClicked != 255)
         msg.Write(correct);
     buttonClicked = 255;
     foreach (byte b in buttons)
         msg.Write(b);
     for (int i = 5; i > buttons.Count; i--)
         msg.Write((byte)255);
 }
Esempio n. 10
0
 /// <summary>
 /// serialize quaternion into the stream
 /// </summary>
 /// <param name="message"></param>
 public void OnSerialize(Lidgren.Network.NetOutgoingMessage message)
 {
     message.Write(quaternion.x);
     message.Write(quaternion.y);
     message.Write(quaternion.z);
     message.Write(quaternion.w);
 }
Esempio n. 11
0
 /// <summary>
 /// serialize vector3 into message
 /// </summary>
 /// <param name="message"></param>
 public void OnSerialize(Lidgren.Network.NetOutgoingMessage message)
 {
     message.Write(vector3.x);
     message.Write(vector3.y);
     message.Write(vector3.z);
 }
Esempio n. 12
0
 /// <summary>
 /// serialize the vector3 to the message
 /// </summary>
 /// <param name="vector3"></param>
 /// <param name="message"></param>
 public static void Serialize(this Vector3 vector3, Lidgren.Network.NetOutgoingMessage message)
 {
     message.Write(vector3.x);
     message.Write(vector3.y);
     message.Write(vector3.z);
 }
Esempio n. 13
0
        internal void Write(Lidgren.Network.NetOutgoingMessage Message)
        {
            Message.Write(xpos);
            Message.Write(ypos);
            Message.Write(zpos);

            Message.Write((Int32)PlayerID);
        }
Esempio n. 14
0
 protected override void WriteData(Lidgren.Network.NetOutgoingMessage Message)
 {
     Message.Write((Int32)p.PlayerID);
     p.Write(Message);
 }