Class EightDirectionalMove

java.lang.Object
engine.entity.movement.AbstractMove
engine.entity.movement.EightDirectionalMove

public class EightDirectionalMove extends AbstractMove
  • 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

      private Point totalDist
    • p

      private Point p
    • xywh

      private Rect xywh
  • Constructor Details

    • EightDirectionalMove

      public EightDirectionalMove()
    • EightDirectionalMove

      public EightDirectionalMove(Rect xywh, float speed)
    • EightDirectionalMove

      public EightDirectionalMove(Rect xywh, float speed, float scale)
  • Method Details

    • instantiate

      private void instantiate(Rect xywh, float speed, float scale)
    • move

      public void move(AbstractEntity c)
      Specified by:
      move in class AbstractMove
    • get

      public AbstractMove get()
      Specified by:
      get in class AbstractMove
    • getX

      public float getX()
      Specified by:
      getX in class AbstractMove
    • getY

      public float getY()
      Specified by:
      getY in class AbstractMove
    • getW

      public float getW()
      Specified by:
      getW in class AbstractMove
    • getH

      public float getH()
      Specified by:
      getH in class AbstractMove
    • getS

      public float getS()
      Specified by:
      getS in class AbstractMove
    • getSW

      public float getSW()
      Specified by:
      getSW in class AbstractMove
    • getSH

      public float getSH()
      Specified by:
      getSH in class AbstractMove
    • getPoint

      public Point getPoint()
      Specified by:
      getPoint in class AbstractMove
    • getMoveType

      public Move getMoveType()
      Specified by:
      getMoveType in class AbstractMove
    • getPotential

      private Point getPotential(int dir)
    • getPotential

      private Point getPotential()
    • getMoveDist

      public Point 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)
      Specified by:
      setDir in class AbstractMove
    • setIdle

      public void setIdle(boolean i)
      Specified by:
      setIdle in class AbstractMove
    • getDir

      public int getDir()
      Specified by:
      getDir in class AbstractMove
    • dirChanged

      public boolean dirChanged()
      Specified by:
      dirChanged in class AbstractMove
    • getIsIdle

      public boolean getIsIdle()
      Specified by:
      getIsIdle in class AbstractMove