Class ReputationEngine
- java.lang.Object
-
- ch.sahits.game.openpatrician.engine.AbstractEngine
-
- ch.sahits.game.openpatrician.engine.player.ReputationEngine
-
@Lazy @Service @DependentInitialisation(StartNewGameBean.class) public class ReputationEngine extends AbstractEngine
Engine to handle the reputation changes.
-
-
Field Summary
Fields Modifier and Type Field Description private com.google.common.eventbus.AsyncEventBus
clientServerEventBus
private IMap
map
private SeaPiratesState
piratesState
-
Constructor Summary
Constructors Constructor Description ReputationEngine()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
destroy()
java.util.List<AbstractEngine>
getChildren()
Any engine may hold various child engines.void
handlePirateDefeated(ShipAttackEvent event)
void
handlePirateDefeated(ShipDefenseEvent event)
private void
initialize()
private void
updateReputationDueToPirateDefeat(INavigableVessel pirateVessel, INavigableVessel playerVessel)
-
-
-
Field Detail
-
clientServerEventBus
@Autowired @Qualifier("serverClientEventBus") private com.google.common.eventbus.AsyncEventBus clientServerEventBus
-
piratesState
@Autowired private SeaPiratesState piratesState
-
map
@Autowired private IMap map
-
-
Method Detail
-
getChildren
public java.util.List<AbstractEngine> getChildren()
Description copied from class:AbstractEngine
Any engine may hold various child engines. This is the way to retrieve them. If there are no child engines, return an empty list. Subclasses have to implement this in the proper way.- Specified by:
getChildren
in classAbstractEngine
- Returns:
- list of child engines.
-
initialize
@PostConstruct private void initialize()
-
destroy
@PreDestroy private void destroy()
-
handlePirateDefeated
public void handlePirateDefeated(ShipAttackEvent event)
-
handlePirateDefeated
public void handlePirateDefeated(ShipDefenseEvent event)
-
updateReputationDueToPirateDefeat
private void updateReputationDueToPirateDefeat(INavigableVessel pirateVessel, INavigableVessel playerVessel)
-
-