Example #1
0
        public static void DrawEllipse(TileMap tilemap, Vector2 locPosA, Vector2 locPosB, uint[,] tileData, bool isFilled, bool randomize = false)
        {
            int x0 = TileMapUtil.GetGridX(tilemap, locPosA);
            int y0 = TileMapUtil.GetGridY(tilemap, locPosA);
            int x1 = TileMapUtil.GetGridX(tilemap, locPosB);
            int y1 = TileMapUtil.GetGridY(tilemap, locPosB);

            DrawEllipse(tilemap, x0, y0, x1, y1, tileData, isFilled, randomize);
        }
Example #2
0
        public static void DrawLineMirrored(TileMap tilemap, Vector2 locPosA, Vector2 locPosB, uint[,] tileData, bool randomize = false)
        {
            int x0 = TileMapUtil.GetGridX(tilemap, locPosA);
            int y0 = TileMapUtil.GetGridY(tilemap, locPosA);
            int x1 = TileMapUtil.GetGridX(tilemap, locPosB);
            int y1 = TileMapUtil.GetGridY(tilemap, locPosB);

            DrawLineMirrored(tilemap, x0, y0, x1, y1, tileData, randomize);
        }
Example #3
0
 public void DoPaintPressed(TileMap tileMap, Vector2 local_pos, EventModifiers modifiers = default(EventModifiers))
 {
     LogCat.log(string.Format("DoPaintPressed ({0},{1})", TileMapUtil.GetGridX(tileMap, local_pos), TileMapUtil.GetGridY(tileMap, local_pos)));
     if (paint_mode == TileSetBrushPaintMode.Pencil)
     {
         Paint(tileMap, local_pos);
     }
     else
     {
         pressed_position = local_pos;
         is_dragging      = true;
         offset           = Vector2.zero;
         brushPattern     = GetBrushPattern();
     }
 }