|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
TTile
- tile type used.TSkill
- skill type used.TAttr
- attributes type used.public interface ExtractAbility<TTile extends AbstractPathTile,TSkill extends AbstractSkill<TTile,TSkill,TAttr>,TAttr extends AbstractAttributes,TRsc>
This interface represents the ability of ressource extraction. It includes extraction from a ressource point, and drop off at a warehouse. It is also possible to specify work time.
Method Summary | |
---|---|
TRsc |
getRessourceType()
Get ressource type. |
boolean |
hasRessources()
Check if worker has a ressources location. |
boolean |
hasWarehouse()
Check if worker has a warehouse location. |
boolean |
isExtracting()
Check if worker is currently working on extraction. |
void |
setDropOffTime(long time)
Set time to drop off ressource inside the warehouse. |
void |
setExtractionTime(long time)
Set time for extraction (in millisecond). |
void |
setRessourceLocation(int tx,
int ty)
Set ressource location (as a tile). |
void |
setRessourceType(TRsc type)
Set ressource type to extract. |
void |
setWarehouse(int tx,
int ty)
Set storage point (where will be stored ressources). |
void |
startExtraction()
Start extraction. |
void |
stopExtraction()
Stop any action related to extration. |
void |
updateExtraction(float extrp)
Update extraction (extract and go back). |
Method Detail |
---|
void updateExtraction(float extrp)
extrp
- extrapolation value.void setRessourceLocation(int tx, int ty)
tx
- map tile x.ty
- map tile y.void setWarehouse(int tx, int ty)
tx
- map tile x.ty
- map tile y.boolean hasRessources()
boolean hasWarehouse()
void setExtractionTime(long time)
time
- extraction time in millisecond.void setDropOffTime(long time)
time
- drop off time in millisecond.void setRessourceType(TRsc type)
type
- ressource type.TRsc getRessourceType()
void startExtraction()
boolean isExtracting()
void stopExtraction()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |