Interface CombatEntityAPI

All Known Subinterfaces:
BattleObjectiveAPI, CombatAsteroidAPI, DamagingProjectileAPI, EmpArcEntityAPI, MissileAPI, ShipAPI

public interface CombatEntityAPI
  • Method Details

    • getLocation

      org.lwjgl.util.vector.Vector2f getLocation()
    • getVelocity

      org.lwjgl.util.vector.Vector2f getVelocity()
    • getFacing

      float getFacing()
    • setFacing

      void setFacing(float facing)
    • getAngularVelocity

      float getAngularVelocity()
    • setAngularVelocity

      void setAngularVelocity(float angVel)
    • getOwner

      int getOwner()
      0 = player 1 = enemy 100 = neutral (used for ship hulks)
      Returns:
    • setOwner

      void setOwner(int owner)
      0 = player 1 = enemy 100 = neutral (used for ship hulks)
    • getCollisionRadius

      float getCollisionRadius()
    • getCollisionClass

      CollisionClass getCollisionClass()
    • setCollisionClass

      void setCollisionClass(CollisionClass collisionClass)
    • getMass

      float getMass()
    • setMass

      void setMass(float mass)
    • getExactBounds

      BoundsAPI getExactBounds()
      Can return null if there aren't any bounds, in which case just the collision radius should be used. The bounds are guaranteed to be inside the collision radius.
      Returns:
    • getShield

      ShieldAPI getShield()
      Returns null for entities without shields.
      Returns:
    • getHullLevel

      float getHullLevel()
      Returns:
      hull level, normalized to (0, 1)
    • getHitpoints

      float getHitpoints()
      Returns:
      actual hull points left
    • getMaxHitpoints

      float getMaxHitpoints()
      Returns:
      maximum hull points for the ship
    • setCollisionRadius

      void setCollisionRadius(float radius)
      Should always circumscribe the bounds, if any.
      Parameters:
      radius -
    • getAI

      Object getAI()
    • isExpired

      boolean isExpired()
    • setCustomData

      void setCustomData(String key, Object data)
    • removeCustomData

      void removeCustomData(String key)
    • getCustomData

      Map<String,Object> getCustomData()
      DO NOT call .put() methods on the returned map. Use setCustomData() instead. When the map is empty, it will return a new non-null map that will not be retained, so any additions to it would be lost.
      Returns:
    • setHitpoints

      void setHitpoints(float hitpoints)
    • isPointInBounds

      boolean isPointInBounds(org.lwjgl.util.vector.Vector2f p)
    • wasRemoved

      boolean wasRemoved()