Exemplo n.º 1
0
 public static void Buffer(DrawData draw)
 {
     foreach (PixelData pixel in draw.pixels)
     {
         PixelData old = buffer.FirstOrDefault(f => f.isbot == pixel.isbot && f.x == pixel.x && f.y == pixel.y);
         if (old != null)
         {
             old.color = pixel.color;
         }
         else
         {
             buffer.Add(pixel);
         }
     }
 }
Exemplo n.º 2
0
        static public void DrawHandler(NetConnection connection, object data)
        {
            DrawData draw = GSrv.Deserialize <DrawData>((byte[])data);

            World.Buffer(draw);
        }