Class TiledBrush


public class TiledBrush extends ItemBrush
  • Constructor Details

  • Method Details

    • handleTouchDown

      public boolean handleTouchDown(float x, float y)
      Overrides:
      handleTouchDown in class ItemBrush
      Parameters:
      x - touchdown coord
      y - touchdown coord
      Returns:
      whether the brush is handling this event
    • handleTouchUp

      public void handleTouchUp()
      Description copied from class: Brush
      Handle a touchup event
      Overrides:
      handleTouchUp in class ItemBrush
    • handleDrag

      public void handleDrag(float x, float y)
      Overrides:
      handleDrag in class ItemBrush
      Parameters:
      x - drag coord
      y - drag coord
    • updateSurroundingTiles

      public static void updateSurroundingTiles(Types.IntVector2 origin, MapScreen map, Item item)
    • updateTiles

      public static void updateTiles(Types.IntVector2 position, MapScreen map, Item item, boolean recurse)
    • getAdjancencies

      public static int getAdjancencies(Types.IntVector2 position, MapScreen screen, Item item, boolean recurse)
    • cancel

      public void cancel()
      Description copied from class: EditorTool
      Called when the user presses Escape while this is the active tool
      Overrides:
      cancel in class Brush
    • getName

      public String getName()
      Overrides:
      getName in class ItemBrush
    • draw

      public Optional<Item> draw(int x, int y)
      Overrides:
      draw in class ItemBrush
      Parameters:
      x - coord in game units where this brush should draw
      y - coord in game units where this brush should draw
      Returns:
      the newly drawn item