|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectcz.cuni.amis.pogamut.base.agent.module.AgentModule<AGENT>
cz.cuni.amis.pogamut.base.agent.module.SensorModule<UT2004Bot>
nl.tudelft.pogamut.ut2004.agent.module.shooting.AbstractWeaponShooting
nl.tudelft.pogamut.ut2004.agent.module.shooting.weapon.LinkGunShooting
public class LinkGunShooting
Module to efficient work with the link gun. Will power up team mates when possible.
To power up a team mate the
AbstractWeaponShooting.shoot(WeaponPref, ILocated) must be called with a
target that is a friendly player. In which case the weaponPref will be
ignored. The module will only shoot at team mates who are in less then
LINK_GUN_SEC_MAX_RANGE UT units away. To conserve
ammo this shooting will not shoot at friendly players when they are not in
range.
When facing a shielded player, the module will switch to secondary fire mode if the target is within secondary range or stop shooting all together.
| Field Summary | |
|---|---|
protected static WeaponPref |
LINK_GUN_PRIMARY
Primary mode preference. |
protected static int |
LINK_GUN_SEC_MAX_RANGE
Practical experiments show that the link guns secondary fire has a range of 1150UT units. |
protected static WeaponPref |
LINK_GUN_SECONDARY
Secondary mode preference. |
protected static int |
SHIELD_GUN_DEFLECT_ANGLE
Angle at which shield gun can deflect projectiles. |
| Fields inherited from class nl.tudelft.pogamut.ut2004.agent.module.shooting.AbstractWeaponShooting |
|---|
ABOVE_PLAYER_OFFSET, active, BELOW_PLAYER_OFFSET, endMessageListener, FACING_ANGLE, focus, info, shoot, target, weaponPref, weaponry |
| Fields inherited from class cz.cuni.amis.pogamut.base.agent.module.SensorModule |
|---|
worldView |
| Fields inherited from class cz.cuni.amis.pogamut.base.agent.module.AgentModule |
|---|
agent, controller, eventBus, log |
| Constructor Summary | |
|---|---|
LinkGunShooting(UT2004Bot<?,?,?> bot,
AgentInfo info,
ImprovedShooting shoot,
Weaponry weaponry)
|
|
| Method Summary | |
|---|---|
protected boolean |
canAssist(Player player)
|
protected WeaponPref |
getDefaultWeaponPref()
Primary fire mode is preferred for the link gun. |
protected void |
shoot()
Shoot will be called after every end message. |
protected void |
shootFriend(Player player)
|
| Methods inherited from class nl.tudelft.pogamut.ut2004.agent.module.shooting.AbstractWeaponShooting |
|---|
getFocus, getWeaponType, hasTarget, isActive, isWeaponReady, setFocus, shoot, stopShoot |
| Methods inherited from class cz.cuni.amis.pogamut.base.agent.module.AgentModule |
|---|
cleanUp, getComponentId, getLog, getState, initComponentId, isRunning, kill, pause, reset, resume, start, stop, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface nl.tudelft.pogamut.ut2004.agent.module.shooting.WeaponShooting |
|---|
getFocus, getWeaponType, isActive, shoot, stopShoot |
| Field Detail |
|---|
protected static final int SHIELD_GUN_DEFLECT_ANGLE
protected static final int LINK_GUN_SEC_MAX_RANGE
protected static final WeaponPref LINK_GUN_SECONDARY
protected static final WeaponPref LINK_GUN_PRIMARY
| Constructor Detail |
|---|
public LinkGunShooting(UT2004Bot<?,?,?> bot,
AgentInfo info,
ImprovedShooting shoot,
Weaponry weaponry)
| Method Detail |
|---|
protected void shoot()
AbstractWeaponShootingShoot will be called after every end message.
Implementing subclasses should make a best effort attempt to shoot the given target using the given weapon preference if possible. Subclasses should take care to note that a target may not always be present. e.g. target == null.
shoot in class AbstractWeaponShootingprotected void shootFriend(Player player)
protected boolean canAssist(Player player)
protected WeaponPref getDefaultWeaponPref()
getDefaultWeaponPref in class AbstractWeaponShooting
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||