Example #1
0
        public Balloon(string id)
        {
            this.ID = id;

            BackgroundColor = new Colour(255, 255, 255, 255);
            Votes = 0;
        }
 private Message DecodeBalloonStateUpdate(BinaryReader reader, MessageType type)
 {
     string balloonID = reader.ReadString();
     OverlayType overlayType = (OverlayType)reader.ReadInt32();
     byte r = reader.ReadByte();
     byte g = reader.ReadByte();
     byte b = reader.ReadByte();
     byte a = reader.ReadByte();
     Colour c = new Colour(r, g, b, a);
     int votes = reader.ReadInt32();
     return new BalloonStateUpdateMessage(balloonID, overlayType, c, votes);
 }
Example #3
0
 public BalloonStateUpdateMessage(string balloonID, OverlayType overlayType, Colour bgColor, int votes)
     : base(MessageType.BalloonStateUpdate, Tag, balloonID)
 {
     m_overlayType = overlayType;
     m_bgColor = bgColor;
     m_votes = votes;
 }
 private Message ParseBalloonStateUpdate(JArray args)
 {
     string balloonID = args[1].ToObject<string>();
     OverlayType overlayType = (OverlayType)args[2].ToObject<int>();
     byte r = args[3].ToObject<byte>();
     byte g = args[4].ToObject<byte>();
     byte b = args[5].ToObject<byte>();
     byte a = args[6].ToObject<byte>();
     Colour c = new Colour(r, g, b, a);
     int votes = args[7].Value<int>();
     return new BalloonStateUpdateMessage(balloonID, overlayType, c, votes);
 }
Example #5
0
 public BalloonDecorationUpdateMessage(int balloonID, int overlayType, Colour bgColor)
     : base(MessageType.BalloonDecorationUpdate, Tag, balloonID)
 {
     m_overlayType = overlayType;
     m_bgColor = bgColor;
 }