nl.tudelft.pogamut.ut2004.agent.module.shooting.weapon
Class LinkGunShooting
java.lang.Object
cz.cuni.amis.pogamut.base.agent.module.AgentModule<AGENT>
cz.cuni.amis.pogamut.base.agent.module.SensorModule<cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004Bot>
nl.tudelft.pogamut.unreal.agent.module.shooting.AbstractWeaponShooting
nl.tudelft.pogamut.ut2004.agent.module.shooting.weapon.LinkGunShooting
- All Implemented Interfaces:
- cz.cuni.amis.pogamut.base.component.IComponent, nl.tudelft.pogamut.unreal.agent.module.shooting.WeaponShooting
public class LinkGunShooting
- extends nl.tudelft.pogamut.unreal.agent.module.shooting.AbstractWeaponShooting
- implements nl.tudelft.pogamut.unreal.agent.module.shooting.WeaponShooting
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.
- Author:
- mpkorstanje
|
Field Summary |
protected static cz.cuni.amis.pogamut.ut2004.agent.module.sensor.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 cz.cuni.amis.pogamut.ut2004.agent.module.sensor.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.unreal.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(cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004Bot<?,?,?> bot,
cz.cuni.amis.pogamut.ut2004.agent.module.sensor.AgentInfo info,
cz.cuni.amis.pogamut.ut2004.bot.command.ImprovedShooting shoot,
cz.cuni.amis.pogamut.ut2004.agent.module.sensomotoric.Weaponry weaponry)
|
|
Method Summary |
protected boolean |
canAssist(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Player player)
|
protected cz.cuni.amis.pogamut.ut2004.agent.module.sensor.WeaponPref |
getDefaultWeaponPref()
Primary fire mode is preferred for the link gun. |
protected void |
shoot()
|
protected void |
shootFriend(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Player player)
|
| Methods inherited from class nl.tudelft.pogamut.unreal.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 interface nl.tudelft.pogamut.unreal.agent.module.shooting.WeaponShooting |
getFocus, getWeaponType, isActive, shoot, stopShoot |
SHIELD_GUN_DEFLECT_ANGLE
protected static final int SHIELD_GUN_DEFLECT_ANGLE
- Angle at which shield gun can deflect projectiles.
- See Also:
- Constant Field Values
LINK_GUN_SEC_MAX_RANGE
protected static final int LINK_GUN_SEC_MAX_RANGE
- Practical experiments show that the link guns secondary fire has a range
of 1150UT units. When attached to a friendly player, the range is ~1500UT
unit. Since we can't test attachment we use 1150UT units.
- See Also:
- Constant Field Values
LINK_GUN_SECONDARY
protected static final cz.cuni.amis.pogamut.ut2004.agent.module.sensor.WeaponPref LINK_GUN_SECONDARY
- Secondary mode preference.
LINK_GUN_PRIMARY
protected static final cz.cuni.amis.pogamut.ut2004.agent.module.sensor.WeaponPref LINK_GUN_PRIMARY
- Primary mode preference.
LinkGunShooting
public LinkGunShooting(cz.cuni.amis.pogamut.ut2004.bot.impl.UT2004Bot<?,?,?> bot,
cz.cuni.amis.pogamut.ut2004.agent.module.sensor.AgentInfo info,
cz.cuni.amis.pogamut.ut2004.bot.command.ImprovedShooting shoot,
cz.cuni.amis.pogamut.ut2004.agent.module.sensomotoric.Weaponry weaponry)
shoot
protected void shoot()
- Specified by:
shoot in class nl.tudelft.pogamut.unreal.agent.module.shooting.AbstractWeaponShooting
shootFriend
protected void shootFriend(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Player player)
canAssist
protected boolean canAssist(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.Player player)
getDefaultWeaponPref
protected cz.cuni.amis.pogamut.ut2004.agent.module.sensor.WeaponPref getDefaultWeaponPref()
- Primary fire mode is preferred for the link gun.
- Specified by:
getDefaultWeaponPref in class nl.tudelft.pogamut.unreal.agent.module.shooting.AbstractWeaponShooting
Copyright © 2015 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.