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

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

public interface BuilderAbility<TTile extends AbstractPathTile,TSkill extends AbstractSkill<TTile,TSkill,TAttr>,TAttr extends AbstractAttributes>

This interface represents the ability of constructing a building at a specific location. It is mainly used by the builder unit type.


Method Summary
 void buildAt(int tx, int ty, java.lang.String building, int tw, int th, int time)
          Define a construction plan, set the action to 'build', and move to the destination.
 AbstractBuilding<TTile,TSkill,TAttr> getBuilding()
          Get building which will be built.
 boolean isConstructing()
          Check if builder is currently constructing.
 void onConstructed(AbstractBuilding<TTile,TSkill,TAttr> building)
          Called by the building when construction is done.
 void stopBuild()
          Stop any action, reset all states.
 void updateConstruction(float extrp)
          Update construction routine.
 

Method Detail

buildAt

void buildAt(int tx,
             int ty,
             java.lang.String building,
             int tw,
             int th,
             int time)
Define a construction plan, set the action to 'build', and move to the destination. Construction will start after entry has arrived.

Parameters:
tx - building construction location x.
ty - building construction location y.
building - building to build.
tw - building width.
th - building height.
time - construction time.

updateConstruction

void updateConstruction(float extrp)
Update construction routine.

Parameters:
extrp - extrapolation value.

stopBuild

void stopBuild()
Stop any action, reset all states.


isConstructing

boolean isConstructing()
Check if builder is currently constructing.

Returns:
true if constructing

getBuilding

AbstractBuilding<TTile,TSkill,TAttr> getBuilding()
Get building which will be built.

Returns:
building going to be built.

onConstructed

void onConstructed(AbstractBuilding<TTile,TSkill,TAttr> building)
Called by the building when construction is done.

Parameters:
building - building built.