Package engine.entity.movement
Class EightDirectional
java.lang.Object
engine.entity.Move
engine.entity.movement.EightDirectional
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionEightDirectional(Rect xywh, float speed) EightDirectional(Rect xywh, float speed, float scale) -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidget()intgetDir()floatgetH()booleangetPoint()private Pointprivate PointgetPotential(int dir) floatgetS()floatgetSH()floatgetSW()floatgetW()floatgetX()floatgetY()voidprivate voidinstantiate(Rect xywh, float speed, float scale) voidvoidsetCanChange(boolean canChange) voidsetDir(int d) voidvoidsetForceWalk(boolean forceWalk) voidprivate booleansetHelper(float x, boolean isX) voidsetIdle(boolean i) voidprivate booleansetX(float x) private booleansetY(float y) voidMethods inherited from class engine.entity.Move
getTriggers, move, move
-
Field Details
-
isIdle
private boolean isIdle -
forceWalk
private boolean forceWalk -
canChange
private boolean canChange -
tID
private long tID -
dir
private int dir -
ldir
private int ldir -
fdir
private int fdir -
maxSpeed
private float maxSpeed -
currSpeed
private float currSpeed -
scale
private float scale -
totalDist
-
p
-
xywh
-
-
Constructor Details
-
EightDirectional
public EightDirectional() -
EightDirectional
-
EightDirectional
-
-
Method Details
-
instantiate
-
move
-
get
-
getX
public float getX() -
getY
public float getY() -
getW
public float getW() -
getH
public float getH() -
getS
public float getS() -
getSW
public float getSW() -
getSH
public float getSH() -
getPoint
-
getMoveType
- Specified by:
getMoveTypein classMove
-
getPotential
-
getPotential
-
getMoveDist
-
halfSpeed
public void halfSpeed() -
doubSpeed
public void doubSpeed() -
setHalfSpeed
public void setHalfSpeed() -
setNormSpeed
public void setNormSpeed() -
setDoubSpeed
public void setDoubSpeed() -
setX
private boolean setX(float x) -
setY
private boolean setY(float y) -
setHelper
private boolean setHelper(float x, boolean isX) -
showHitBox
public void showHitBox() -
setForceWalk
public void setForceWalk(boolean forceWalk) -
setCanChange
public void setCanChange(boolean canChange) -
setDir
public void setDir(int d) -
setIdle
public void setIdle(boolean i) -
getDir
public int getDir() -
dirChanged
public boolean dirChanged()- Specified by:
dirChangedin classMove
-
getIsIdle
public boolean getIsIdle()
-