Package com.tenio.engine.physic.common
Class Path
- java.lang.Object
-
- com.tenio.engine.physic.common.Path
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
java.util.List<Vector2>
createRandomPath(int numWaypoints, float minX, float minY, float maxX, float maxY)
void
enableLoop(boolean enabled)
Vector2
getCurrentWayPoint()
java.util.List<Vector2>
getWayPoints()
boolean
isEndOfWayPoints()
void
render(Paint paint)
To render objects to screenvoid
setPath(Path path)
void
setToNextWayPoint()
Moves the iterator on to the next way-point in the listvoid
setWayPoints(java.util.List<Vector2> wayPoints)
Adds a way-point to the end of the path methods for setting the path with either another path or a list of vectors
-
-
-
Method Detail
-
isEndOfWayPoints
public boolean isEndOfWayPoints()
- Returns:
- true if the end of the list has been reached, false otherwise
-
setToNextWayPoint
public void setToNextWayPoint()
Moves the iterator on to the next way-point in the list
-
createRandomPath
public java.util.List<Vector2> createRandomPath(int numWaypoints, float minX, float minY, float maxX, float maxY)
-
enableLoop
public void enableLoop(boolean enabled)
-
setWayPoints
public void setWayPoints(java.util.List<Vector2> wayPoints)
Adds a way-point to the end of the path methods for setting the path with either another path or a list of vectors- Parameters:
wayPoints
- list of way-points
-
setPath
public void setPath(Path path)
-
clear
public void clear()
-
getWayPoints
public java.util.List<Vector2> getWayPoints()
-
-