nl.tudelft.pogamut.unreal.agent.module.shooting.weapon
Class GenericWeaponShooting

Package class diagram package GenericWeaponShooting
java.lang.Object
  extended by cz.cuni.amis.pogamut.base.agent.module.AgentModule<AGENT>
      extended by cz.cuni.amis.pogamut.base.agent.module.SensorModule<UT2004Bot>
          extended by nl.tudelft.pogamut.unreal.agent.module.shooting.AbstractWeaponShooting
              extended by nl.tudelft.pogamut.unreal.agent.module.shooting.weapon.GenericWeaponShooting
All Implemented Interfaces:
cz.cuni.amis.pogamut.base.component.IComponent, WeaponShooting

public class GenericWeaponShooting
extends AbstractWeaponShooting

Fall back module to handle unknown weapons. Will shoot the primary mode at visible targets.

Author:
mpkorstanje

Field Summary
protected  WeaponPref weaponPref
           
 
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, 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
GenericWeaponShooting(UT2004Bot<?,?,?> agent, AgentInfo info, ImprovedShooting shoot, Weaponry weaponry, ItemType weapon)
           
 
Method Summary
protected  WeaponPref getDefaultWeaponPref()
           
protected  void shoot()
           Shoot will be called after every end message.
 
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 class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

weaponPref

protected WeaponPref weaponPref
Constructor Detail

GenericWeaponShooting

public GenericWeaponShooting(UT2004Bot<?,?,?> agent,
                             AgentInfo info,
                             ImprovedShooting shoot,
                             Weaponry weaponry,
                             ItemType weapon)
Method Detail

shoot

protected void shoot()
Description copied from class: AbstractWeaponShooting

Shoot 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.

Specified by:
shoot in class AbstractWeaponShooting

getDefaultWeaponPref

protected WeaponPref getDefaultWeaponPref()
Specified by:
getDefaultWeaponPref in class AbstractWeaponShooting
Returns:
the default weapon preference.


Copyright © 2015 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.