Package com.misc
Class Arrow
- java.lang.Object
-
- com.badlogic.gdx.math.Polygon
-
- com.misc.Arrow
-
- All Implemented Interfaces:
com.badlogic.gdx.math.Shape2D
public class Arrow extends com.badlogic.gdx.math.PolygonCreates a polygon which looks like an arrow which points to a target vector
-
-
Constructor Summary
Constructors Constructor Description Arrow(float baseWidth, float headWidth, float baseHeight, float headHeight)Constructs an arrow with the following parameters
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaimAtTarget(com.badlogic.gdx.math.Vector2 target)"Update" function which rotates the arrow head to point to the the target-
Methods inherited from class com.badlogic.gdx.math.Polygon
area, contains, contains, dirty, getBoundingRectangle, getOriginX, getOriginY, getRotation, getScaleX, getScaleY, getTransformedVertices, getVertices, getX, getY, rotate, scale, setOrigin, setPosition, setRotation, setScale, setVertices, translate
-
-
-
-
Constructor Detail
-
Arrow
public Arrow(float baseWidth, float headWidth, float baseHeight, float headHeight)Constructs an arrow with the following parameters- Parameters:
baseWidth- width of the stem of the arrowheadWidth- width of the pointy arrow headbaseHeight- height of the stem of the arrowheadHeight- height of the pointy arrow head
-
-