public abstract class Ability extends java.lang.Object implements IRenderable
Modifier and Type | Class and Description |
---|---|
static interface |
Ability.AbilityCastListener |
Modifier | Constructor and Description |
---|---|
protected |
Ability(Creature executor)
Initializes a new instance of the
Ability class. |
Modifier and Type | Method and Description |
---|---|
void |
addEffect(Effect effect) |
java.awt.Shape |
calculateImpactArea() |
java.awt.geom.Ellipse2D |
calculatePotentialImpactArea() |
boolean |
canCast() |
AbilityExecution |
cast()
Casts the ability by the temporal conditions of the specified game loop and
the spatial circumstances of the specified environment.
|
AbilityAttributes |
getAttributes() |
CastType |
getCastType() |
float |
getCooldownInSeconds() |
AbilityExecution |
getCurrentExecution() |
java.lang.String |
getDescription() |
protected java.util.List<Effect> |
getEffects() |
Creature |
getExecutor() |
java.lang.String |
getName() |
EntityPivot |
getPivot() |
float |
getRemainingCooldownInSeconds() |
protected java.awt.Shape |
internalCalculateImpactArea(double angle) |
boolean |
isActive() |
boolean |
isMultiTarget() |
void |
onCast(Ability.AbilityCastListener listener) |
void |
onEffectApplied(Effect.EffectAppliedListener listener) |
void |
onEffectCeased(Effect.EffectCeasedListener listener) |
void |
removeAbilityCastListener(Ability.AbilityCastListener listener) |
void |
render(java.awt.Graphics2D g)
Renders the visual contents of this instance onto the provided graphics context.
|
void |
setCastType(CastType castType) |
void |
setDescription(java.lang.String description) |
void |
setMultiTarget(boolean multiTarget) |
void |
setName(java.lang.String name) |
protected Ability(Creature executor)
Ability
class.executor
- The executing entitypublic void onCast(Ability.AbilityCastListener listener)
public void removeAbilityCastListener(Ability.AbilityCastListener listener)
public void onEffectApplied(Effect.EffectAppliedListener listener)
public void onEffectCeased(Effect.EffectCeasedListener listener)
public void addEffect(Effect effect)
public java.awt.Shape calculateImpactArea()
public java.awt.geom.Ellipse2D calculatePotentialImpactArea()
public boolean canCast()
public AbilityExecution cast()
AbilityExecution
object that wraps all information about
this execution of the ability.public AbilityAttributes getAttributes()
public CastType getCastType()
public float getCooldownInSeconds()
public AbilityExecution getCurrentExecution()
public java.lang.String getDescription()
public Creature getExecutor()
public java.lang.String getName()
public EntityPivot getPivot()
public float getRemainingCooldownInSeconds()
public boolean isActive()
public boolean isMultiTarget()
public void render(java.awt.Graphics2D g)
IRenderable
If an Entity
implements this interface, this method will be called right after the entity was rendered from the environment.
Allowing for a custom rendering mechanism.
This interface can be implemented in general by anything that should be rendered to the game's screen.
render
in interface IRenderable
g
- The current graphics object onto which this instance will render its visual contents.RenderEngine.renderEntity(Graphics2D, de.gurkenlabs.litiengine.entities.IEntity)
public void setName(java.lang.String name)
public void setDescription(java.lang.String description)
public void setMultiTarget(boolean multiTarget)
public void setCastType(CastType castType)
protected java.util.List<Effect> getEffects()
protected java.awt.Shape internalCalculateImpactArea(double angle)