|
||||||||||
| 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.WeaponryShooting
public class WeaponryShooting
Module that handles shooting other players in an intelligent manner.
Will utilize WeaponPrefs to determine which weapon to use for the
target its WeaponShooting modules to effectively use the weapon.
The targets for shooting can be set on the logic thread, but the actual
shooting is evaluated by listening to the EndMessage.
This module obeys the restrictions set by
ImprovedShooting.setChangeWeaponCooldown(long) and uses
WeaponPrefs.getWeaponPreference(ILocated) to determine which weapon
to use.
The UT2004Navigation.setFocus(ILocated) is used to indicate where the
bot wants to look. It should be honored for best results.
| Field Summary | |
|---|---|
protected cz.cuni.amis.pogamut.base3d.worldview.object.ILocated |
currentTarget
Current target. |
protected WeaponPref |
currentWeaponPref
Current weapon pref to use. |
protected WeaponShooting |
currentWeaponShooting
Currently active shooting. |
protected FocusProvider |
focus
Focus provider, use to set where you want to look. |
protected AgentInfo |
info
Info about the agent. |
protected cz.cuni.amis.pogamut.base3d.worldview.object.ILocated |
lastTarget
Previous target. |
protected WeaponPref |
lastWeaponPref
Weapon pref used in the previous evaluation of shoot(). |
protected WeaponShooting |
lastWeaponShooting
Shooting active in the previous evaluation of shoot(). |
protected ImprovedShooting |
shoot
Reference to shooting module to shoot stuff. |
protected WeaponPrefs |
weaponPrefs
Reference to WeaponPrefs |
protected Weaponry |
weaponry
Reference to all the weapons we have. |
protected Map<ItemType,WeaponShooting> |
weaponShootings
Map of weapon shooting and associated weapons. |
| 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 | |
|---|---|
WeaponryShooting(UT2004Bot bot,
AgentInfo info,
Weaponry weaponry,
WeaponPrefs weaponPrefs,
ImprovedShooting shoot)
Creates a new WeaponryShooting module. |
|
| Method Summary | |
|---|---|
WeaponShooting |
addWeaponShooting(WeaponShooting weaponShooting)
Adds a new WeaponShooting. |
cz.cuni.amis.pogamut.base3d.worldview.object.ILocated |
getFocus()
|
cz.cuni.amis.pogamut.base3d.worldview.object.ILocated |
getLastTarget()
|
cz.cuni.amis.pogamut.base3d.worldview.object.ILocated |
getTarget()
|
WeaponPref |
getWeaponPref()
|
WeaponShooting |
getWeaponShooting()
|
WeaponShooting |
removeWeaponShooting(ItemType weapon)
Removes the WeaponShooting for the given weapon. |
void |
shoot(cz.cuni.amis.pogamut.base3d.worldview.object.ILocated target)
Sets the target to be shot at. |
void |
stopShoot()
Clears the target and stops the shooting. |
| 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 |
| Field Detail |
|---|
protected cz.cuni.amis.pogamut.base3d.worldview.object.ILocated currentTarget
protected WeaponPref currentWeaponPref
protected WeaponShooting currentWeaponShooting
protected FocusProvider focus
protected AgentInfo info
protected cz.cuni.amis.pogamut.base3d.worldview.object.ILocated lastTarget
protected WeaponPref lastWeaponPref
shoot().
protected WeaponShooting lastWeaponShooting
shoot().
protected ImprovedShooting shoot
protected WeaponPrefs weaponPrefs
WeaponPrefs
protected Weaponry weaponry
protected Map<ItemType,WeaponShooting> weaponShootings
| Constructor Detail |
|---|
public WeaponryShooting(UT2004Bot bot,
AgentInfo info,
Weaponry weaponry,
WeaponPrefs weaponPrefs,
ImprovedShooting shoot)
bot - info - weaponry - weaponPrefs - shoot - | Method Detail |
|---|
public WeaponShooting addWeaponShooting(WeaponShooting weaponShooting)
weaponShooting -
WeaponShooting for the associated weapon.public WeaponShooting removeWeaponShooting(ItemType weapon)
weapon - the weapon for which the WeaponShooting should be removed.
public cz.cuni.amis.pogamut.base3d.worldview.object.ILocated getFocus()
public cz.cuni.amis.pogamut.base3d.worldview.object.ILocated getLastTarget()
public cz.cuni.amis.pogamut.base3d.worldview.object.ILocated getTarget()
public WeaponPref getWeaponPref()
public WeaponShooting getWeaponShooting()
public void shoot(cz.cuni.amis.pogamut.base3d.worldview.object.ILocated target)
target - public void stopShoot()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||