|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cz.cuni.amis.pogamut.base.agent.module.AgentModule<AGENT> cz.cuni.amis.pogamut.base.agent.module.SensomotoricModule<UT2004Bot> cz.cuni.amis.pogamut.ut2004.bot.command.BotCommands cz.cuni.amis.pogamut.ut2004.bot.command.SimpleShooting cz.cuni.amis.pogamut.ut2004.bot.command.AdvancedShooting
public class AdvancedShooting
Class providing Pogamut2 UT2004 advanced shooting commands for the bot - shooting in secondary mode, grenade launcher shooting, etc.
Field Summary |
---|
Fields inherited from class cz.cuni.amis.pogamut.base.agent.module.SensomotoricModule |
---|
act, worldView |
Fields inherited from class cz.cuni.amis.pogamut.base.agent.module.AgentModule |
---|
agent, controller, eventBus, log |
Constructor Summary | |
---|---|
AdvancedShooting(UT2004Bot agent,
java.util.logging.Logger log)
Constructor. |
Method Summary | |
---|---|
protected void |
reset()
Resets the agent module so it may be reused. |
void |
shoot()
Bot will start shooting his current weapon (Issues GB SHOOT command) |
void |
shoot(Player target)
Bot will start shooting with his current weapon at the target provided. |
void |
shoot(UnrealId target)
Bot will start shooting with his current weapon at the target provided. |
void |
shootPrimary(ILocated location)
Bot will start shooting his current weapon with primary firing mode at the location specified. |
void |
shootPrimary(Player target)
Shortcut for 'shootPrimary(player.getId())', see shootPrimary(UnrealId) . |
void |
shootPrimary(UnrealId target)
Bot will start shooting his current weapon with primary firing mode at the target specified. |
void |
shootPrimaryCharged(ILocated location,
double chargeTime)
This method can be used for UT2004 charging weapons. |
void |
shootPrimaryCharged(Player target,
double chargeTime)
Shortcut for 'shootPrimaryCharged(player.getId())', see shootPrimaryCharged(UnrealId, double) . |
void |
shootPrimaryCharged(UnrealId target,
double chargeTime)
This method can be used for UT2004 charging weapons. |
void |
shootSecondary()
Bot will start shooting his current weapon with selected mode. |
void |
shootSecondary(ILocated location)
Bot will start shooting his current weapon with secondary firing mode at the location specified. |
void |
shootSecondary(Player target)
Shortcut for 'shootSecondary(player.getId())', see shootSecondary(UnrealId) . |
void |
shootSecondary(UnrealId target)
Bot will start shooting his current weapon with secondary firing mode at the target specified. |
void |
shootSecondaryCharged(ILocated location,
double chargeTime)
This method can be used for UT2004 charging weapons. |
void |
shootSecondaryCharged(Player target,
double chargeTime)
Shortcut for 'shootSecondaryCharged(player.getId())', see shootSecondaryCharged(UnrealId, double) . |
void |
shootSecondaryCharged(UnrealId target,
double chargeTime)
This method can be used for UT2004 charging weapons. |
void |
shootWithMode(boolean secondaryMode)
Bot will start shooting his current weapon with selected mode. |
void |
stopShoot()
Bot will stop shooting his current weapon (Issues GB STOPSHOOT command) |
void |
stopShooting()
The bot will stop shooting completely (regardless on the mode of shooting). |
Methods inherited from class cz.cuni.amis.pogamut.ut2004.bot.command.SimpleShooting |
---|
shoot |
Methods inherited from class cz.cuni.amis.pogamut.base.agent.module.AgentModule |
---|
cleanUp, getComponentId, getLog, getState, initComponentId, isRunning, kill, pause, resume, start, stop, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AdvancedShooting(UT2004Bot agent, java.util.logging.Logger log)
agent
- AbstractUT2004Bot we will send commands forlog
- Logger to be used for logging runtime/debug info.Method Detail |
---|
public void stopShooting()
(issues GB STOPSHOOT command)
public void shootWithMode(boolean secondaryMode)
(issues GB SHOOT command)
secondaryMode
- If true secondary firing mode will be issued.public void shootSecondary()
(issues GB SHOOT command)
secondaryMode
- If true secondary firing mode will be issued.public void shootPrimary(ILocated location)
(issues GB SHOOT command)
location
- Location we will be shooting at.shootPrimary(UnrealId)
public void shootPrimary(UnrealId target)
(issues GB SHOOT command)
target
- Object in the environment we will shoot at.shootPrimary(ILocated)
public void shootPrimary(Player target)
shootPrimary(UnrealId)
.
(issues GB SHOOT command)
target
- Player the bot wants to shoot at.public void shootSecondary(ILocated location)
(issues GB SHOOT command)
location
- Location we will be shooting at.shootSecondary(UnrealId)
public void shootSecondary(UnrealId target)
(issues GB SHOOT command)
target
- Object in the environment we will shoot at.shootSecondary(ILocated)
public void shootSecondary(Player target)
shootSecondary(UnrealId)
.
(issues GB SHOOT command)
target
- Player the bot wants to shoot at.public void shootPrimaryCharged(ILocated location, double chargeTime)
This method can be also used for non-charing (primary) firing mode of the weapon - then it will work as burst fire - the bot will continue firing for the amout of seconds specified.
So if the current weapon primary firing mode is charging, the bot will release the projectiles once. With normal primary firing mode the bot will fire a burst.
Note: We will shoot at location specified. The bot will continue to aim on the location in the environment (for the time of charging or bursting) as long as other commands won't change his focus (strafe(), turnTo()..). If they will the bot will still shoot on location until he will turn from it more then approx 15 - 30 degrees. Then he won't be able to hit the location anymore.
(issues GB SHOOT command)
location
- Location we will be shooting at.chargeTime
- In seconds - how long we will charge the weapon (or how long
will be the burst fire).shootPrimaryCharged(UnrealId, double)
public void shootPrimaryCharged(UnrealId target, double chargeTime)
This method can be also used for non-charing (primary) firing mode of the weapon - then it will work as burst fire - the bot will continue firing for the amout of seconds specified.
So if the current weapon primary firing mode is charging, the bot will release the projectiles once. With normal primary firing mode the bot will fire a burst.
Note: The target for shooting should exist in the environment. The bot will track the target in the environment (for the time of charging or bursting) as long as other commands won't change his focus (strafe(), turnTo()..). If they will the bot will still shoot on target location until he will turn from target more then approx 15 - 30 degrees. Then he won't be able to hit the target location anymore.
(issues GB SHOOT command)
target
- Object in the environment we will shoot at (basic tracking
provided).chargeTime
- In seconds - how long we will charge the weapon (or how long
will be the burst fire).shootPrimaryCharged(ILocated, double)
public void shootPrimaryCharged(Player target, double chargeTime)
shootPrimaryCharged(UnrealId, double)
.
(issues GB SHOOT command)
target
- Player the bot wants to shoot at.public void shootSecondaryCharged(ILocated location, double chargeTime)
This method can be also used for non-charing (secondary) firing mode of the weapon - then it will work as burst fire - the bot will continue firing for the amout of seconds specified.
So if the current weapon secondary firing mode is charging, the bot will release the projectiles once. With normal secondary firing mode the bot will fire a burst.
Note: We will shoot at location specified. The bot will continue to aim on the location in the environment (for the time of charging or bursting) as long as other commands won't change his focus (strafe(), turnTo()..). If they will the bot will still shoot on location until he will turn from it more then approx 15 - 30 degrees. Then he won't be able to hit the location anymore.
(issues GB SHOOT command)
location
- Location we will be shooting at.chargeTime
- In seconds - how long we will charge the weapon (or how long
will be the burst fire).shootSecondaryCharged(UnrealId, double)
public void shootSecondaryCharged(UnrealId target, double chargeTime)
This method can be also used for non-charing (secondary) firing mode of the weapon - then it will work as burst fire - the bot will continue firing for the amout of seconds specified.
So if the current weapon secondary firing mode is charging, the bot will release the projectiles once. With normal secondary firing mode the bot will fire a burst.
Note: The target for shooting should exist in the environment. The bot will track the target in the environment (for the time of charging or bursting) as long as other commands won't change his focus (strafe(), turnTo()..). If they will the bot will still shoot on target location until he will turn from target more then approx 15 - 30 degrees. Then he won't be able to hit the target location anymore.
(issues GB SHOOT command)
target
- Object in the environment we will shoot at (basic tracking
provided).chargeTime
- In seconds - how long we will charge the weapon (or how long
will be the burst fire).shootSecondaryCharged(ILocated, double)
public void shootSecondaryCharged(Player target, double chargeTime)
shootSecondaryCharged(UnrealId, double)
.
(issues GB SHOOT command)
target
- Player the bot wants to shoot at.protected void reset()
reset
in class AgentModule<UT2004Bot>
public void shoot()
SimpleShooting
shoot
in class SimpleShooting
SimpleShooting.stopShoot()
,
SimpleShooting.shoot(UnrealId)
,
SimpleShooting.shoot(ILocated)
public void shoot(UnrealId target)
SimpleShooting
shoot
in class SimpleShooting
target
- Target (that should be ILocated) the bot will shoot at. Bot
will track the target, but see note above.SimpleShooting.stopShoot()
,
SimpleShooting.shoot()
public void shoot(Player target)
SimpleShooting
shoot
in class SimpleShooting
target
- Player the bot wants to shoot at.SimpleShooting.stopShoot()
,
SimpleShooting.shoot()
public void stopShoot()
SimpleShooting
stopShoot
in class SimpleShooting
SimpleShooting.shoot()
,
SimpleShooting.shoot(UnrealId)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |