T
- The entity enum type used.C
- The cost type used.P
- The producible type used.E
- The entity type used.public interface ProducerUsedServices<T extends java.lang.Enum<T>,C extends ProductionCostRts,P extends Producible<T,C>,E extends EntityRts> extends ProducerListener<T,C,P,E>
Modifier and Type | Method and Description |
---|---|
boolean |
canBeProduced(P producible)
Condition to make production start.
|
boolean |
canProduce(P producible)
Condition to start production check (able to produce).
|
E |
getEntityToProduce(T id)
Get entity to produce from its id.
|
int |
getPlayerId()
Get the player id.
|
int |
getStepsPerSecond()
Get the number of steps done per seconds (the production speed).
|
notifyCanNotProduce, notifyProduced, notifyProducing, notifyStartProduction
boolean canProduce(P producible)
Example:
producible
- The producible to check.true
if able to produce, false
else.boolean canBeProduced(P producible)
For example:
producible
- The productible reference.true
if can start production, false
else.E getEntityToProduce(T id)
FactoryObjectGame.create(Enum)
.id
- The entity id.int getStepsPerSecond()
int getPlayerId()