UnitTemplate¶
-
public class
UnitTemplate
extends Template<Unit> implements Serializable¶ Contains information shared between units of the same type.
Author: Tim
Fields¶
Methods¶
canProduce¶
getCarryingCapacity¶
-
public int
getCarryingCapacity
(ResourceNode.Type type)¶ Return the amount of resource that you can gather from each node type.
Parameters: - type – The type of resource node to gather from.
getDurationAttack¶
-
public int
getDurationAttack
()¶ Get the number of steps needed to make a single attack
getDurationDeposit¶
-
public int
getDurationDeposit
()¶ Get the number of steps needed to make a single deposit.
getDurationGatherGold¶
-
public int
getDurationGatherGold
()¶ Get the number of steps needed to make a single gather on a mine.
getDurationGatherWood¶
-
public int
getDurationGatherWood
()¶ Get the number of steps needed to make a single gather on a tree.
getDurationMove¶
-
public int
getDurationMove
()¶ Get the number of steps needed to make a single move.
getGatherRate¶
-
public int
getGatherRate
(ResourceNode.Type type)¶
getProduces¶
getView¶
-
public UnitTemplateView
getView
()¶
produceInstance¶
-
public Unit
produceInstance
(IDDistributer idsource)¶
setDurationAttack¶
-
public void
setDurationAttack
(int durationAttack)¶ Set the number of steps needed to make a single attack
Parameters: - durationAttack –
setDurationDeposit¶
-
public void
setDurationDeposit
(int durationDeposit)¶ Set the number of steps needed to make a single deposit.
Parameters: - durationDeposit –
setDurationGatherGold¶
-
public void
setDurationGatherGold
(int durationGoldGather)¶ Set the number of steps needed to make a single gather on a mine.
Parameters: - durationGoldGather –
setDurationGatherWood¶
-
public void
setDurationGatherWood
(int durationWoodGather)¶ Set the number of steps needed to make a single gather on a tree.
Parameters: - durationWoodGather –