Class Ability
java.lang.Object
de.gurkenlabs.litiengine.abilities.Ability
- All Implemented Interfaces:
IRenderable
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleancanCast()cast()Casts the ability by the temporal conditions of the specified game loop and the spatial circumstances of the specified environment.floatgetName()getPivot()floatprotected ShapeinternalCalculateImpactArea(double angle) booleanisActive()booleanbooleanvoidonCast(Ability.AbilityCastListener listener) voidonEffectApplied(Effect.EffectAppliedListener listener) voidonEffectCeased(Effect.EffectCeasedListener listener) voidvoidrender(Graphics2D g) Renders the visual contents of this instance onto the provided graphics context.voidsetCastType(CastType castType) voidsetDescription(String description) voidsetMultiTarget(boolean multiTarget) void
-
Constructor Details
-
Ability
Initializes a new instance of theAbilityclass.- Parameters:
executor- The executing entity
-
-
Method Details
-
onCast
-
removeAbilityCastListener
-
onEffectApplied
-
onEffectCeased
-
addEffect
-
calculateImpactArea
-
calculatePotentialImpactArea
-
canCast
public boolean canCast() -
isOnCooldown
public boolean isOnCooldown() -
cast
Casts the ability by the temporal conditions of the specified game loop and the spatial circumstances of the specified environment. An ability execution will be taken out that start applying all the effects of this ability.- Returns:
- An
AbilityExecutionobject that wraps all information about this execution of the ability.
-
getAttributes
-
getCastType
-
getCooldownInSeconds
public float getCooldownInSeconds() -
getCurrentExecution
-
getDescription
-
getExecutor
-
getName
-
getPivot
-
getRemainingCooldownInSeconds
public float getRemainingCooldownInSeconds() -
isActive
public boolean isActive() -
isMultiTarget
public boolean isMultiTarget() -
render
Description copied from interface:IRenderableRenders the visual contents of this instance onto the provided graphics context.If an
Entityimplements 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.
- Specified by:
renderin interfaceIRenderable- Parameters:
g- The current graphics object onto which this instance will render its visual contents.- See Also:
-
setName
-
setDescription
-
setMultiTarget
public void setMultiTarget(boolean multiTarget) -
setCastType
-
getEffects
-
internalCalculateImpactArea
-