|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.springrts.ai.oo.Unit
public class Unit
Method Summary | |
---|---|
int |
compareTo(Unit other)
|
boolean |
equals(Object otherObject)
|
int |
getAiHint()
Indicates the units main function. |
int |
getAllyTeam()
|
int |
getBuildingFacing()
Returns the unit's build facing (0-3) |
List<CurrentCommand> |
getCurrentCommands()
|
float |
getCurrentFuel()
|
UnitDef |
getDef()
Returns the unit's unitdef struct from which you can read all the statistics of the unit, do NOT try to change any values in it. |
float |
getExperience()
How experienced the unit is (0.0f-1.0f) |
int |
getGroup()
Returns the group a unit belongs to, -1 if none |
float |
getHealth()
The unit's current health |
int |
getLastUserOrderFrame()
Number of the last frame this unit received an order from a player. |
int |
getLineage()
The unit's origin lies in this team. |
float |
getMaxHealth()
The unit's max health |
float |
getMaxRange()
The furthest any weapon of the unit can fire |
float |
getMaxSpeed()
The unit's max speed |
List<ModParam> |
getModParams()
This is a set of parameters that is initialized in CreateUnitRulesParams() and may change during the game. |
AIFloat3 |
getPos()
|
float |
getPower()
Indicate the relative power of the unit, used for experience calulations etc. |
float |
getResourceMake(Resource c_resourceId)
|
float |
getResourceUse(Resource c_resourceId)
|
float |
getSpeed()
|
int |
getStockpile()
|
int |
getStockpileQueued()
|
SupportedCommand |
getSupportedCommand()
|
int |
getTeam()
|
int |
getUnitId()
|
int |
hashCode()
|
boolean |
isActivated()
|
boolean |
isBeingBuilt()
Returns true if the unit is currently being built |
boolean |
isCloaked()
|
boolean |
isNeutral()
|
boolean |
isParalyzed()
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public int getUnitId()
public int compareTo(Unit other)
compareTo
in interface Comparable<Unit>
public boolean equals(Object otherObject)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
public UnitDef getDef()
public int getTeam()
public int getAllyTeam()
public int getLineage()
public int getAiHint()
public int getStockpile()
public int getStockpileQueued()
public float getCurrentFuel()
public float getMaxSpeed()
public float getMaxRange()
public float getMaxHealth()
public float getExperience()
public int getGroup()
public float getHealth()
public float getSpeed()
public float getPower()
public float getResourceUse(Resource c_resourceId)
public float getResourceMake(Resource c_resourceId)
public AIFloat3 getPos()
public boolean isActivated()
public boolean isBeingBuilt()
public boolean isCloaked()
public boolean isParalyzed()
public boolean isNeutral()
public int getBuildingFacing()
public int getLastUserOrderFrame()
public List<ModParam> getModParams()
public List<CurrentCommand> getCurrentCommands()
public SupportedCommand getSupportedCommand()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |