|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--Skill | +--SkillDash
This class encapsulates the intelligence for a dash skill
Field Summary | |
private double |
blurFactor
The blur-factor steers the sharpness of the Destination, because a bot never runs that straight. |
private boolean |
correctedMyDirLastTime
have already corrected direction ? |
private double |
currentDistance
Current distance of the destination |
private int |
dashPower
The dash power for the bot |
private byte |
dashType
There are two Dash Types: The "dash to destination", and "dash a distance", they have constants defined in StrategyGeneralInterface |
private boolean |
DEBUG
class internal debug switch |
private java.awt.geom.Point2D.Double |
destination
The destination Point |
(package private) DynObject |
dynObject
The destination Object |
private double |
percentage
percentage between 0 and 1of current dash-power that should be inc/dec |
private byte |
precision
precision |
Fields inherited from class Skill |
clearLock, cycles, player |
Constructor Summary | |
SkillDash(Player player,
double dist,
int power)
Initialise the Skill with a distance, dashPower and a bunch of cycles |
|
SkillDash(Player player,
double dist,
int power,
int cycles)
Initialise the Skill with a distance, dashPower and a bunch of cycles |
|
SkillDash(Player player,
DynObject dynObject,
int power,
byte precision)
Initialise the Skill with a distance, dashPower and a bunch of cycles |
|
SkillDash(Player player,
DynObject dynObject,
int power,
byte precision,
int cycles)
Initialise the Skill with a distance, dashPower and a bunch of cycles |
|
SkillDash(Player player,
java.awt.geom.Point2D.Double dest,
int power)
Initialise the Skill with a destination, dashPower ,currentDistance gets computed right away |
|
SkillDash(Player player,
java.awt.geom.Point2D.Double dest,
int power,
byte precision)
Initialise the Skill with a destination, dashPower precision, currentDistance gets computed right away |
|
SkillDash(Player player,
java.awt.geom.Point2D.Double dest,
int power,
byte precision,
int cycles)
Initialise the Skill with a destination, dashPower precision, currentDistance gets computed right away |
|
SkillDash(Player player,
java.awt.geom.Point2D.Double dest,
int power,
int cycles)
Initialise the Skill with a destination, dashPower precision, currentDistance gets computed right away |
Method Summary | |
(package private) void |
debug(java.lang.String id,
java.lang.String msg)
|
void |
perform()
performs the Skill |
(package private) void |
setblurFactor()
setblurfactor in dependeny of precision with which the skill shall be executed |
boolean |
succeeded()
checks wether the skill has succeede (TRUE --> will be deleted from SkillQueue) |
Methods inherited from class Skill |
isLocked, setClearLock |
Methods inherited from class java.lang.Object |
|
Field Detail |
private final boolean DEBUG
private byte dashType
private double blurFactor
private double currentDistance
DynObject dynObject
private java.awt.geom.Point2D.Double destination
private int dashPower
private double percentage
private byte precision
private boolean correctedMyDirLastTime
Constructor Detail |
public SkillDash(Player player, java.awt.geom.Point2D.Double dest, int power)
player
- reference to playerdest
- destinationpower
- dashPowerpublic SkillDash(Player player, java.awt.geom.Point2D.Double dest, int power, byte precision)
player
- reference to playerdest
- destinationpower
- dashPowerprecision
- precisionpublic SkillDash(Player player, java.awt.geom.Point2D.Double dest, int power, byte precision, int cycles)
player
- reference to playerdest
- destinationprecision
- precisioncycles
- cyclespower
- powerpublic SkillDash(Player player, java.awt.geom.Point2D.Double dest, int power, int cycles)
player
- reference to playerdest
- destinationpower
- dashPowercycles
- cyclespublic SkillDash(Player player, double dist, int power, int cycles)
player
- reference to playerdist
- distancepower
- dashPowercycles
- cyclespublic SkillDash(Player player, double dist, int power)
player
- reference to playerdist
- distancepower
- dashPowerpublic SkillDash(Player player, DynObject dynObject, int power, byte precision)
player
- reference to playerdynObject
- destinationpower
- dashPowerprecision
- precisionpublic SkillDash(Player player, DynObject dynObject, int power, byte precision, int cycles)
player
- reference to playerdynObject
- destinationpower
- dashPowerprecision
- precisioncycles
- cyclesMethod Detail |
public void perform()
perform
in class Skill
public boolean succeeded()
succeeded
in class Skill
void setblurFactor()
void debug(java.lang.String id, java.lang.String msg)
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |