Package com.dragonboatrace.tools
Class VectorFactory
- java.lang.Object
-
- com.dragonboatrace.tools.VectorFactory
-
public class VectorFactory extends java.lang.Object
Contains static methods to create various vectors.
-
-
Constructor Summary
Constructors Constructor Description VectorFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static com.badlogic.gdx.math.Vector2
boatPosition(float laneLeftBound, int laneWidth)
Returns a boat's starting position in a lanestatic com.badlogic.gdx.math.Vector2
randomPosition(EntityType entityType, float laneLeftBound, int laneWidth)
Returns a random position inside of a lane.
-
-
-
Method Detail
-
randomPosition
public static com.badlogic.gdx.math.Vector2 randomPosition(EntityType entityType, float laneLeftBound, int laneWidth)
Returns a random position inside of a lane.- Parameters:
entityType
- type of an entity this is the position of.laneLeftBound
- x value of the left edge of the lane.laneWidth
- width of the lane- Returns:
- Vector2 of the position
-
boatPosition
public static com.badlogic.gdx.math.Vector2 boatPosition(float laneLeftBound, int laneWidth)
Returns a boat's starting position in a lane- Parameters:
laneLeftBound
- x value of the left edge of the lane.laneWidth
- width of the lane- Returns:
- Vector2 of the position
-
-