E
- The entity type used.A
- The attacker type used.W
- The weapon type used.public interface AttackerServices<E extends EntityStrategy,A extends AttackerUsedServices<E>,W extends WeaponServices<E,A>>
Modifier and Type | Method and Description |
---|---|
void |
addWeapon(W weapon,
int id)
Add a weapon.
|
void |
attack(E entity)
Define a target to attack.
|
W |
getWeapon(int id)
Get a weapon from its id.
|
boolean |
isAttacking()
Check if currently attacking.
|
void |
removeWeapon(int id)
Remove a weapon.
|
void |
setWeapon(int weaponId)
Set the current weapon to use.
|
void |
stopAttack()
Stop current weapon attack.
|
void |
updateAttack(double extrp)
Update attack routine.
|
void addWeapon(W weapon, int id)
weapon
- The weapon instance.id
- The weapon index number.void removeWeapon(int id)
id
- The weapon to remove from its index number.W getWeapon(int id)
id
- The weapon id.void setWeapon(int weaponId)
weaponId
- The weapon to use from its index number.void attack(E entity)
entity
- The target to attack.void stopAttack()
void updateAttack(double extrp)
extrp
- The extrapolation value.boolean isAttacking()
true
if attacking, false
else.Copyright © 2014 Byron 3D Games Studio. All rights reserved.