Class EightDirectional

java.lang.Object
engine.entity.Move
engine.entity.movement.EightDirectional

public class EightDirectional extends 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

      private Point totalDist
    • p

      private Point p
    • xywh

      private Rect xywh
  • Constructor Details

    • EightDirectional

      public EightDirectional()
    • EightDirectional

      public EightDirectional(Rect xywh, float speed)
    • EightDirectional

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

    • instantiate

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

      public void move(Entity c)
      Specified by:
      move in class Move
    • get

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

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

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

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

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

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

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

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

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

      public Moves getMoveType()
      Specified by:
      getMoveType in class Move
    • 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 Move
    • setIdle

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

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

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

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