com.b3dgs.lionengine.game.strategy.ability
Class AbstractAttackerDistanceAbility<TTile extends AbstractPathTile,TSkill extends AbstractSkill<TTile,TSkill,TAttr>,TAttr extends AbstractAttributes>

java.lang.Object
  extended by com.b3dgs.lionengine.game.strategy.ability.AbstractAttackerAbility<TTile,TSkill,TAttr>
      extended by com.b3dgs.lionengine.game.strategy.ability.AbstractAttackerDistanceAbility<TTile,TSkill,TAttr>
Type Parameters:
TTile - tile type used.
TSkill - skill type used.
TAttr - attributes type used.
All Implemented Interfaces:
AttackerAbility<TTile,TSkill,TAttr>

public abstract class AbstractAttackerDistanceAbility<TTile extends AbstractPathTile,TSkill extends AbstractSkill<TTile,TSkill,TAttr>,TAttr extends AbstractAttributes>
extends AbstractAttackerAbility<TTile,TSkill,TAttr>

Specific attacker ability implementation designed to be used for distance attack. When the attack is ready, a projectile is thrown to a specified target.

See Also:
Projectile

Field Summary
 
Fields inherited from class com.b3dgs.lionengine.game.strategy.ability.AbstractAttackerAbility
frame
 
Constructor Summary
AbstractAttackerDistanceAbility(AbstractUnit<TTile,TSkill,TAttr> attacker, Projectile<?> projectile)
           
 
Method Summary
abstract  void onAttacked()
          Action called when entry finished its attack.
 void onPause()
          Action called while entry is waiting for next attack.
 void onReaching()
          Action called while entry is reaching target.
 boolean onStartAttack()
          Action called when entry is going to attack.
abstract  void onThrown()
          Actin called when entry thrown projectile.
 void stopAttack()
          Stop any action, reset all states.
 void updateAttack(float extrp)
          Update attack routine.
 
Methods inherited from class com.b3dgs.lionengine.game.strategy.ability.AbstractAttackerAbility
attack, isAttacking, onLostTarget, setAttackFrame, setAttackTimer, setMaximalAttackDistance, setMinimalAttackDistance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractAttackerDistanceAbility

public AbstractAttackerDistanceAbility(AbstractUnit<TTile,TSkill,TAttr> attacker,
                                       Projectile<?> projectile)
Method Detail

updateAttack

public void updateAttack(float extrp)
Description copied from interface: AttackerAbility
Update attack routine.

Specified by:
updateAttack in interface AttackerAbility<TTile extends AbstractPathTile,TSkill extends AbstractSkill<TTile,TSkill,TAttr>,TAttr extends AbstractAttributes>
Overrides:
updateAttack in class AbstractAttackerAbility<TTile extends AbstractPathTile,TSkill extends AbstractSkill<TTile,TSkill,TAttr>,TAttr extends AbstractAttributes>
Parameters:
extrp - extrapolation value.

onThrown

public abstract void onThrown()
Actin called when entry thrown projectile.


onAttacked

public abstract void onAttacked()
Action called when entry finished its attack.


stopAttack

public void stopAttack()
Description copied from interface: AttackerAbility
Stop any action, reset all states.

Specified by:
stopAttack in interface AttackerAbility<TTile extends AbstractPathTile,TSkill extends AbstractSkill<TTile,TSkill,TAttr>,TAttr extends AbstractAttributes>
Overrides:
stopAttack in class AbstractAttackerAbility<TTile extends AbstractPathTile,TSkill extends AbstractSkill<TTile,TSkill,TAttr>,TAttr extends AbstractAttributes>

onReaching

public void onReaching()
Description copied from class: AbstractAttackerAbility
Action called while entry is reaching target.

Specified by:
onReaching in class AbstractAttackerAbility<TTile extends AbstractPathTile,TSkill extends AbstractSkill<TTile,TSkill,TAttr>,TAttr extends AbstractAttributes>

onStartAttack

public boolean onStartAttack()
Description copied from class: AbstractAttackerAbility
Action called when entry is going to attack.

Specified by:
onStartAttack in class AbstractAttackerAbility<TTile extends AbstractPathTile,TSkill extends AbstractSkill<TTile,TSkill,TAttr>,TAttr extends AbstractAttributes>
Returns:
true if attack started.

onPause

public void onPause()
Description copied from class: AbstractAttackerAbility
Action called while entry is waiting for next attack.

Specified by:
onPause in class AbstractAttackerAbility<TTile extends AbstractPathTile,TSkill extends AbstractSkill<TTile,TSkill,TAttr>,TAttr extends AbstractAttributes>