Class BeamNode

All Implemented Interfaces:
Comparable<Content>, Senseable

public class BeamNode extends PowerBlock
  • Field Details

    • range

      public int range
    • laser

      public arc.graphics.g2d.TextureRegion laser
    • laserEnd

      public arc.graphics.g2d.TextureRegion laserEnd
    • laserColor1

      public arc.graphics.Color laserColor1
    • laserColor2

      public arc.graphics.Color laserColor2
    • pulseScl

      public float pulseScl
    • pulseMag

      public float pulseMag
    • laserWidth

      public float laserWidth
  • Constructor Details

    • BeamNode

      public BeamNode(String name)
  • Method Details

    • setBars

      public void setBars()
      Overrides:
      setBars in class Block
    • setStats

      public void setStats()
      Description copied from class: UnlockableContent
      Initializes stats on demand. Should only be called once. Only called before something is displayed.
      Overrides:
      setStats in class Block
    • init

      public void init()
      Description copied from class: Block
      Called after all blocks are created.
      Overrides:
      init in class Block
    • drawPlace

      public void drawPlace(int x, int y, int rotation, boolean valid)
      Description copied from class: Block
      Drawn when you are placing a block.
      Overrides:
      drawPlace in class Block
    • changePlacementPath

      public void changePlacementPath(arc.struct.Seq<arc.math.geom.Point2> points, int rotation, boolean diagonal)
      Description copied from class: Block
      Mutates the given list of points used during line placement.
      Overrides:
      changePlacementPath in class Block
    • getNodeLinks

      public static void getNodeLinks(Tile tile, Block block, Team team, arc.func.Cons<mindustry.gen.Building> others)
      Iterates through linked nodes of a block at a tile. All returned buildings are beam nodes.
    • drawLaser

      public void drawLaser(float x1, float y1, float x2, float y2, int size1, int size2)
      Note that x1 and y1 are expected to be coordinates of the node to draw the beam from.