|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cz.cuni.amis.pogamut.ut2004.agent.module.sensor.WeaponPrefsRange
public class WeaponPrefsRange
Constructor Summary | |
---|---|
protected |
WeaponPrefsRange(WeaponPrefs owner,
double maxDistance)
|
|
WeaponPrefsRange(WeaponPrefs owner,
WeaponPrefsRange prefs)
|
Method Summary | |
---|---|
WeaponPrefsRange |
add(ItemType weapon,
boolean usePrimaryMode)
Adds another weapon as "the least preferable" one, i.e., you may define weapons from the most preferred to the least preferred by sequentially calling this method. |
WeaponPrefsRange |
add(Weapon weapon,
boolean usePrimaryMode)
Adds another weapon as "the least preferable" one, i.e., you may define weapons from the most preferred to the least preferred by sequentially calling this method. |
void |
clear()
Clears all weapon preferences. |
double |
getMaxDistance()
Maximum distance for preferences. |
double |
getMinDistance()
Minimum distance for preferences. |
WeaponPrefs |
getOwner()
Owner of this preferences. |
java.util.List<WeaponPref> |
getPrefs()
Returns list of preferences (from the most preferred one to the least one). |
WeaponPref |
getWeaponPreference()
Return the best weapon the bot has for a given distance. |
WeaponPref |
getWeaponPreference(ItemType... forbiddenWeapons)
Return the best weapon the bot has for a given distance. |
WeaponPref |
getWeaponPreference(WeaponPref... forbiddenWeapons)
Return the best weapon the bot has for a given distance. |
void |
setPrefs(java.util.List<WeaponPref> prefs)
Set list of preferences to be used (from the most preferred one to the least one). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected WeaponPrefsRange(WeaponPrefs owner, double maxDistance)
public WeaponPrefsRange(WeaponPrefs owner, WeaponPrefsRange prefs)
Method Detail |
---|
public WeaponPrefsRange add(ItemType weapon, boolean usePrimaryMode)
weapon
- weapon to be usedusePrimaryMode
- true == use primary firing mode, false == use secondary firing modepublic WeaponPrefsRange add(Weapon weapon, boolean usePrimaryMode)
weapon
- weapon to be usedusePrimaryMode
- true == use primary firing mode, false == use secondary firing mode
public double getMinDistance()
public double getMaxDistance()
public WeaponPref getWeaponPreference()
public WeaponPref getWeaponPreference(ItemType... forbiddenWeapons)
forbiddenWeapons
- optionally, you may define weapons which bot should not choose (i.e. ItemType.ROCKET_LAUNCHER
)
public WeaponPref getWeaponPreference(WeaponPref... forbiddenWeapons)
forbiddenWeapons
- optionally, you may define weapons/mode-of-fire which bot should not choose.
public void clear()
public java.util.List<WeaponPref> getPrefs()
public void setPrefs(java.util.List<WeaponPref> prefs)
prefs
- public WeaponPrefs getOwner()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |