Package com.fs.starfarer.api.util
Class CampaignEntityMovementUtil
java.lang.Object
com.fs.starfarer.api.util.CampaignEntityMovementUtil
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected float
static float
protected SectorEntityToken
protected boolean
protected SmoothFacingUtil
protected org.lwjgl.util.vector.Vector2f
protected float
protected SmoothMovementUtil
protected boolean
-
Constructor Summary
ConstructorsConstructorDescriptionCampaignEntityMovementUtil
(SectorEntityToken entity, float turnAccel, float maxTurnRate, float accel, float maxSpeed) -
Method Summary
Modifier and TypeMethodDescriptionvoid
advance
(float amount) float
protected org.lwjgl.util.vector.Vector2f
boolean
boolean
boolean
void
void
moveInDirection
(float dir) void
moveToLocation
(org.lwjgl.util.vector.Vector2f loc) void
void
setFaceInOppositeDirection
(boolean faceInOppositeDirection) void
setFacing
(float facing) void
setLocation
(org.lwjgl.util.vector.Vector2f loc) void
setTurnThenAccelerate
(boolean turnThenAccelerate) void
setVelocity
(org.lwjgl.util.vector.Vector2f vel) void
stop()
-
Field Details
-
DIRECTION_UNSET
public static float DIRECTION_UNSET -
entity
-
facingUtil
-
movementUtil
-
turnThenAccelerate
protected boolean turnThenAccelerate -
faceInOppositeDirection
protected boolean faceInOppositeDirection -
moveDir
protected float moveDir -
desiredFacing
protected float desiredFacing -
moveDest
protected org.lwjgl.util.vector.Vector2f moveDest -
engineGlow
-
-
Constructor Details
-
CampaignEntityMovementUtil
public CampaignEntityMovementUtil(SectorEntityToken entity, float turnAccel, float maxTurnRate, float accel, float maxSpeed)
-
-
Method Details
-
isFaceInOppositeDirection
public boolean isFaceInOppositeDirection() -
setFaceInOppositeDirection
public void setFaceInOppositeDirection(boolean faceInOppositeDirection) -
isTurnThenAccelerate
public boolean isTurnThenAccelerate() -
setTurnThenAccelerate
public void setTurnThenAccelerate(boolean turnThenAccelerate) -
getFacingUtil
-
getMovementUtil
-
moveInDirection
public void moveInDirection(float dir) -
moveToLocation
public void moveToLocation(org.lwjgl.util.vector.Vector2f loc) -
stop
public void stop() -
leaveOrbit
public void leaveOrbit() -
getPointInDirectionOppositeToVelocity
protected org.lwjgl.util.vector.Vector2f getPointInDirectionOppositeToVelocity() -
advance
public void advance(float amount) -
isDesiredFacingSet
public boolean isDesiredFacingSet() -
getDesiredFacing
public float getDesiredFacing() -
getEntity
-
setFacing
public void setFacing(float facing) -
setLocation
public void setLocation(org.lwjgl.util.vector.Vector2f loc) -
setVelocity
public void setVelocity(org.lwjgl.util.vector.Vector2f vel) -
getEngineGlow
-
setEngineGlow
-