public class PathFollowComponent
extends java.lang.Object
implements com.badlogic.ashley.core.Component, com.badlogic.gdx.utils.Pool.Poolable
| Modifier and Type | Field and Description |
|---|---|
float |
baseRotation |
boolean |
isFacingPath |
boolean |
isPaused |
com.badlogic.gdx.math.Path<com.badlogic.gdx.math.Vector2> |
path |
float |
pathPosition
Position on path from 0f-1f where 0 is p0,
and 1f is pEnd
|
com.badlogic.gdx.math.Vector2 |
point |
float |
speed
Path Lifecycles Per Second
|
| Constructor and Description |
|---|
PathFollowComponent() |
| Modifier and Type | Method and Description |
|---|---|
static PathFollowComponent |
create(com.badlogic.ashley.core.Engine engine) |
void |
reset() |
PathFollowComponent |
setBaseRotation(float baseRotation) |
PathFollowComponent |
setFacingPath(boolean shouldFacePath) |
PathFollowComponent |
setPath(com.badlogic.gdx.math.Path<com.badlogic.gdx.math.Vector2> path) |
PathFollowComponent |
setPathPosition(float position) |
PathFollowComponent |
setPaused(boolean shouldPause) |
PathFollowComponent |
setSpeed(float spd) |
public com.badlogic.gdx.math.Vector2 point
public com.badlogic.gdx.math.Path<com.badlogic.gdx.math.Vector2> path
public boolean isFacingPath
public float baseRotation
public boolean isPaused
public float speed
public float pathPosition
public static PathFollowComponent create(com.badlogic.ashley.core.Engine engine)
public PathFollowComponent setPath(com.badlogic.gdx.math.Path<com.badlogic.gdx.math.Vector2> path)
public PathFollowComponent setSpeed(float spd)
public PathFollowComponent setPathPosition(float position)
public PathFollowComponent setPaused(boolean shouldPause)
public PathFollowComponent setFacingPath(boolean shouldFacePath)
public PathFollowComponent setBaseRotation(float baseRotation)
public void reset()
reset in interface com.badlogic.gdx.utils.Pool.Poolable