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

Type Parameters:
TTile - tile type used.
TSkill - skill type used.
TAttr - attributes type used.
All Known Implementing Classes:
AbstractAttackerAbility, AbstractAttackerDistanceAbility, AbstractAttackerMeleeAbility, AbstractEnemy, AbstractHero, DefaultHeroAttackMelee

public interface AttackerAbility<TTile extends AbstractPathTile,TSkill extends AbstractSkill<TTile,TSkill,TAttr>,TAttr extends AbstractAttributes>

This interface represents the ability of attacking another entity. Mainly used by warrior type entity.


Method Summary
 void attack(AbstractEntry<TTile,TSkill,TAttr> entry)
          Define a target to attack.
 boolean isAttacking()
          Check if entry is attacking.
 void setAttackFrame(int frame)
          Represent the frame number (inside animation) which design the attack action.
 void setAttackTimer(int time)
          Set attack pause time between two attacks.
 void setMaximalAttackDistance(int max)
          Set maximum attack distance bewteen entry and target.
 void setMinimalAttackDistance(int min)
          Set minimum attack distance bewteen entry and target.
 void stopAttack()
          Stop any action, reset all states.
 void updateAttack(float extrp)
          Update attack routine.
 

Method Detail

updateAttack

void updateAttack(float extrp)
Update attack routine.

Parameters:
extrp - extrapolation value.

attack

void attack(AbstractEntry<TTile,TSkill,TAttr> entry)
Define a target to attack. Entry will move to target location. Automaticaly updated if target is moving.

Parameters:
entry - target.

stopAttack

void stopAttack()
Stop any action, reset all states.


setAttackTimer

void setAttackTimer(int time)
Set attack pause time between two attacks.

Parameters:
time - attack pause time.

setAttackFrame

void setAttackFrame(int frame)
Represent the frame number (inside animation) which design the attack action. Ex: for a footman, the frame number when the sword is going to hurt somebody (bewteen 1-last).

Parameters:
frame - frame attack number.

setMinimalAttackDistance

void setMinimalAttackDistance(int min)
Set minimum attack distance bewteen entry and target.

Parameters:
min - minimum attack distance.

setMaximalAttackDistance

void setMaximalAttackDistance(int max)
Set maximum attack distance bewteen entry and target.

Parameters:
max - maximum attack distance.

isAttacking

boolean isAttacking()
Check if entry is attacking.

Returns:
true if currently attacking.