Class UnloadOnArrival
- java.lang.Object
-
- ch.sahits.game.openpatrician.event.handler.ShipEntersPortEventListener
-
- ch.sahits.game.openpatrician.display.event.handler.impl.UnloadOnArrival
-
public class UnloadOnArrival extends ShipEntersPortEventListener
Unload the anonymous ware upon arrival in the city.- Author:
- Andi Hotz, (c) Sahits GmbH, 2014 Created on Dec 20, 2014
-
-
Field Summary
Fields Modifier and Type Field Description private int
amountLoaded
-
Fields inherited from class ch.sahits.game.openpatrician.event.handler.ShipEntersPortEventListener
clientServerEventBus
-
-
Constructor Summary
Constructors Constructor Description UnloadOnArrival(IShip ship, ICity city, int loaded)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
execute(ICity city)
Execute an action.void
handleShipEntersPort(ShipEntersPortEvent event)
private void
initializeEventBus()
private void
unregisterEventBus()
-
Methods inherited from class ch.sahits.game.openpatrician.event.handler.ShipEntersPortEventListener
ignoreEventCity
-
-
-
-
Method Detail
-
initializeEventBus
@PostConstruct private void initializeEventBus()
-
unregisterEventBus
@PreDestroy private void unregisterEventBus()
-
execute
public boolean execute(ICity city)
Description copied from class:ShipEntersPortEventListener
Execute an action.- Specified by:
execute
in classShipEntersPortEventListener
- Parameters:
city
- current city.- Returns:
- flag indicating if the execution was successful and therefor the event listener can be removed.
-
handleShipEntersPort
public void handleShipEntersPort(ShipEntersPortEvent event)
- Overrides:
handleShipEntersPort
in classShipEntersPortEventListener
-
-