Unit¶
Constructors¶
Unit¶
-
public
Unit(UnitTemplate template, int ID)¶
Methods¶
getActionProgressAmount¶
-
public int
getActionProgressAmount()¶ Get the amount of progress toward the completion of a primitive action.
getActionProgressPrimitive¶
getCurrentCargoType¶
-
public ResourceType
getCurrentCargoType()¶
getTemplate¶
-
public UnitTemplate
getTemplate()¶
setCargo¶
-
public boolean
setCargo(ResourceType type, int amount)¶
setDurativeStatus¶
setHP¶
-
public void
setHP(int amount)¶ Set the health of this unit to a specific value.
Parameters: - amount – The new amount of hit points.
setxPosition¶
-
public void
setxPosition(int x)¶ Set the x position of the unit. DO NOT USE THIS TO MOVE UNITS
Parameters: - x –