Klasse EntityMoving

java.lang.Object
com.sunworld.game.world.entity.Entity
com.sunworld.game.world.entity.EntityMoving
Alle implementierten Schnittstellen:
MapObject, MetaHolder, StateHolder
Bekannte direkte Unterklassen:
EntityBossSlime, EntityCultist, EntityItem, EntitySlime, Player, Structure

public abstract non-sealed class EntityMoving extends Entity
Ein Entity, das sich in der Welt bewegen kann.
  • Felddetails

    • ai

      private final EntityAI ai
    • rotation

      protected int rotation
    • lastX

      protected int lastX
    • lastY

      protected int lastY
    • originX

      private int originX
    • originY

      private int originY
    • ticksSinceMovement

      protected int ticksSinceMovement
    • isCollided

      private boolean isCollided
  • Konstruktordetails

    • EntityMoving

      protected EntityMoving(EntityAI ai)
  • Methodendetails

    • getX

      public int getX()
    • getY

      public int getY()
    • getSpeed

      public int getSpeed()
    • setRotation

      public void setRotation(int rotation)
    • setPosition

      public void setPosition(int x, int y)
    • setOrigin

      public void setOrigin(int x, int y)
    • getOriginX

      public int getOriginX()
    • getOriginY

      public int getOriginY()
    • setPositionTiles

      public void setPositionTiles(int x, int y)
    • getLastX

      public int getLastX()
    • getLastY

      public int getLastY()
    • isMoving

      public boolean isMoving()
    • getRotation

      public int getRotation()
      Gibt ein, in welche Richtung ein Entity guckt. 0 bedeutet nach oben, 1 nach rechts usw. Wird evtl. zu Kreisbogenwinkeln geändert statt einfach nur 4 Richtungen. (dann Berechnung von Bewegung über trigonometrische Funktionen)
    • move

      public void move()
      Bewegt das Entity einen Schritt in die aktuelle Richtung, sofern das Level, in dem sich das Entity befindet, das erlaubt.
    • move

      public void move(int speed)
    • isCollided

      public boolean isCollided()
    • getFeetY

      public int getFeetY(int current)
    • getFeetX

      public int getFeetX(int current)
    • getDeltaX

      public int getDeltaX()
      Die Bewegung in X Richtung seit dem letzten Tick
    • getDeltaY

      public int getDeltaY()
      Die Bewegung in Y Richtung seit dem letzten Tick
    • onSpawn

      public void onSpawn()
      Wird aufgerufen, wenn ein Entity der Welt hinzugefügt wird.
    • tickEntity

      public void tickEntity()
    • getTicksSinceMovement

      public int getTicksSinceMovement()
    • getLevel

      public Level getLevel()
    • getDistanceToEntityX

      public int getDistanceToEntityX(EntityMoving other)
    • getDistanceToEntityY

      public int getDistanceToEntityY(EntityMoving other)
    • getDistanceTo

      public double getDistanceTo(int x, int y)
      Setzt außer Kraft:
      getDistanceTo in Klasse Entity
    • getDistanceToEntity

      public double getDistanceToEntity(EntityMoving other)