class NextPatrolStation
extends ch.sahits.game.event.handler.ShipEntersPortEventListener
| Modifier and Type | Field and Description |
|---|---|
private AttackListener |
atackListener |
private com.google.common.eventbus.AsyncEventBus |
clientEventBus |
private com.google.common.eventbus.AsyncEventBus |
clientServerEventBus |
private ch.sahits.game.openpatrician.model.Date |
date |
private org.joda.time.DateTime |
deadline |
private ch.sahits.game.openpatrician.util.l10n.Locale |
locale |
private org.springframework.context.MessageSource |
messageSource |
private ch.sahits.game.openpatrician.model.IPlayer |
player |
private Random |
rnd |
private PatrolInternalState |
state
Next station may be null if it is the last
|
private ClientTaskFactory |
taskFactory |
| Constructor and Description |
|---|
NextPatrolStation(ch.sahits.game.openpatrician.model.ship.IShip ship,
ch.sahits.game.openpatrician.model.city.ICity city,
PatrolInternalState state,
ch.sahits.game.openpatrician.model.IPlayer player,
org.joda.time.DateTime deadline,
AttackListener atackListener)
Create the next patrol station listener.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
execute() |
void |
handleShipEntersPort(ch.sahits.game.event.ShipEntersPortEvent event) |
private void |
initEventBus() |
private final PatrolInternalState state
private final ch.sahits.game.openpatrician.model.IPlayer player
private final org.joda.time.DateTime deadline
private final AttackListener atackListener
@Qualifier(value="serverClientEventBus") private com.google.common.eventbus.AsyncEventBus clientServerEventBus
@Autowired private ch.sahits.game.openpatrician.model.Date date
@Autowired private Random rnd
@Autowired @Qualifier(value="clientEventBus") private com.google.common.eventbus.AsyncEventBus clientEventBus
@Autowired private ClientTaskFactory taskFactory
@Autowired private ch.sahits.game.openpatrician.util.l10n.Locale locale
@Autowired private org.springframework.context.MessageSource messageSource
public NextPatrolStation(ch.sahits.game.openpatrician.model.ship.IShip ship,
ch.sahits.game.openpatrician.model.city.ICity city,
PatrolInternalState state,
ch.sahits.game.openpatrician.model.IPlayer player,
org.joda.time.DateTime deadline,
AttackListener atackListener)
ship - on patrolcity - next citystate - patrol stateplayer - current player (ship owner)deadline - until the ship has to arriveatackListener - attack listener@PostConstruct private void initEventBus()
public void handleShipEntersPort(ch.sahits.game.event.ShipEntersPortEvent event)
handleShipEntersPort in class ch.sahits.game.event.handler.ShipEntersPortEventListenerpublic boolean execute()
execute in class ch.sahits.game.event.handler.ShipEntersPortEventListenerCopyright © 2011-2015 Sahits GmbH. All Rights Reserved.