com.b3dgs.lionengine.game.strategy.ability
Interface ExtractAbility<TTile extends AbstractPathTile,TSkill extends AbstractSkill<TTile,TSkill,TAttr>,TAttr extends AbstractAttributes,TRsc>

Type Parameters:
TTile - tile type used.
TSkill - skill type used.
TAttr - attributes type used.
All Known Implementing Classes:
AbstractExtractAbility

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

updateExtraction

void updateExtraction(float extrp)
Update extraction (extract and go back).

Parameters:
extrp - extrapolation value.

setRessourceLocation

void setRessourceLocation(int tx,
                          int ty)
Set ressource location (as a tile).

Parameters:
tx - map tile x.
ty - map tile y.

setWarehouse

void setWarehouse(int tx,
                  int ty)
Set storage point (where will be stored ressources).

Parameters:
tx - map tile x.
ty - map tile y.

hasRessources

boolean hasRessources()
Check if worker has a ressources location.

Returns:
true if has ressources location.

hasWarehouse

boolean hasWarehouse()
Check if worker has a warehouse location.

Returns:
true if has storage location.

setExtractionTime

void setExtractionTime(long time)
Set time for extraction (in millisecond).

Parameters:
time - extraction time in millisecond.

setDropOffTime

void setDropOffTime(long time)
Set time to drop off ressource inside the warehouse.

Parameters:
time - drop off time in millisecond.

setRessourceType

void setRessourceType(TRsc type)
Set ressource type to extract.

Parameters:
type - ressource type.

getRessourceType

TRsc getRessourceType()
Get ressource type.

Returns:
ressource type.

startExtraction

void startExtraction()
Start extraction.


isExtracting

boolean isExtracting()
Check if worker is currently working on extraction.

Returns:
true if extracting.

stopExtraction

void stopExtraction()
Stop any action related to extration.