@Service public class EventHandlerFactory extends Object
| Modifier and Type | Field and Description |
|---|---|
private org.springframework.context.ApplicationContext |
context |
| Constructor and Description |
|---|
EventHandlerFactory() |
| Modifier and Type | Method and Description |
|---|---|
IAttackListener |
getAttackListener(ch.sahits.game.openpatrician.model.ship.IShip ship,
PatrolInternalState state)
Get the attack listener for a standard patrol.
|
DeliverPackages |
getDeliverPackagesHandler(ch.sahits.game.openpatrician.model.city.ICity city,
ch.sahits.game.openpatrician.model.ship.IShip ship,
org.joda.time.DateTime deadline,
int premium,
int amount)
Retrieve the event handler for delivering packages
|
HirePirateEventHandler |
getHirePirateEventHandler(javafx.beans.property.ObjectProperty<ch.sahits.game.openpatrician.model.ship.IShip> currentShip,
ch.sahits.game.openpatrician.client.ICityPlayerProxyJFX city,
ch.sahits.game.openpatrician.model.people.IPirate pirate,
ClosableDialog delegateDialog)
Create an eventhandler to hire a priate.
|
NextCourierPatrolStation |
getNextCourierPatrolStationHanlder(ch.sahits.game.openpatrician.model.ship.IShip ship,
ch.sahits.game.openpatrician.model.city.ICity city,
CourierPatrolStateInternal state,
ch.sahits.game.openpatrician.model.IPlayer player,
org.joda.time.DateTime deadline)
Retrieve the event handler for the next patrol station
|
NextPatrolStation |
getNextPatrolStateion(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,
IAttackListener atackListener)
Retrieve the next patrol station event listener
|
PassengerLeavesShipOnArival |
getPassengerLeavingOnShipArrivalHandler(ch.sahits.game.openpatrician.model.ship.IShip ship,
ch.sahits.game.openpatrician.model.city.ICity city,
ch.sahits.game.openpatrician.model.IPlayer shipsOwner,
int premium)
Event handler for a passenger leaving the ship in a city
|
ShipArrivalForLoading |
getShipArrivalForLoadingHandler(ch.sahits.game.openpatrician.model.city.ICity city,
ch.sahits.game.openpatrician.model.IPlayer player,
org.joda.time.DateTime deadline,
int requiredAmount,
int premium) |
SinkConcurrentsShipOrder |
getSinkConcurrentsShipOrder(ch.sahits.game.openpatrician.model.IPlayer opponent,
ch.sahits.game.openpatrician.model.IPlayer player,
int offerdTime,
int premium,
ch.sahits.game.openpatrician.model.event.TimedTask reconciliation)
Retrieve the concurrent ship order
|
TavernDialogChangeAction |
getTavernChangeActionHandler(ch.sahits.game.openpatrician.model.people.IPerson showingPerson,
ch.sahits.game.openpatrician.model.city.impl.TavernState tavernState,
ch.sahits.game.openpatrician.model.IPlayer currentPlayer)
Retrieve the event handler for changing the dialog in the tavern.
|
TavernDialogTalkToSideroomPersonAction |
getTavernTalkToSidreroomPersonAction(ch.sahits.game.openpatrician.model.people.IPerson showingPerson,
ch.sahits.game.openpatrician.model.city.impl.TavernState tavernState,
ch.sahits.game.openpatrician.model.IPlayer player)
Retrieve the event handler for talking to a sideroom person
|
UnloadOnArival |
getUnloadOnArrivalHandler(ch.sahits.game.openpatrician.model.ship.IShip ship,
ch.sahits.game.openpatrician.model.city.ICity city,
int loadedAmount)
Create the handler for unloading anonymous ware and register it with the event bus.
|
ViewChangeActionRunnable |
getViewChangeActionRunnable(ENoticeItem selected)
Retrieve the event handler for a new view change runnable.
|
public DeliverPackages getDeliverPackagesHandler(ch.sahits.game.openpatrician.model.city.ICity city, ch.sahits.game.openpatrician.model.ship.IShip ship, org.joda.time.DateTime deadline, int premium, int amount)
city - to which should be deliveredship - that deliversdeadline - until the delivery has to take placepublic ShipArrivalForLoading getShipArrivalForLoadingHandler(ch.sahits.game.openpatrician.model.city.ICity city, ch.sahits.game.openpatrician.model.IPlayer player, org.joda.time.DateTime deadline, int requiredAmount, int premium)
public PassengerLeavesShipOnArival getPassengerLeavingOnShipArrivalHandler(ch.sahits.game.openpatrician.model.ship.IShip ship, ch.sahits.game.openpatrician.model.city.ICity city, ch.sahits.game.openpatrician.model.IPlayer shipsOwner, int premium)
ship - that is leftcity - destinationshipsOwner - premium - on succesfull deliverypublic UnloadOnArival getUnloadOnArrivalHandler(ch.sahits.game.openpatrician.model.ship.IShip ship, ch.sahits.game.openpatrician.model.city.ICity city, int loadedAmount)
ship - ship that has the ware loadedcity - into which the ship should arriveloadedAmount - amount of anonymous ware loaded.public NextCourierPatrolStation getNextCourierPatrolStationHanlder(ch.sahits.game.openpatrician.model.ship.IShip ship, ch.sahits.game.openpatrician.model.city.ICity city, CourierPatrolStateInternal state, ch.sahits.game.openpatrician.model.IPlayer player, org.joda.time.DateTime deadline)
ship - that is on patrolcity - next citystate - patrol stateplayer - deadline - until the patrol has to reach the citypublic ViewChangeActionRunnable getViewChangeActionRunnable(ENoticeItem selected)
selected - notice item that is selected.public TavernDialogTalkToSideroomPersonAction getTavernTalkToSidreroomPersonAction(ch.sahits.game.openpatrician.model.people.IPerson showingPerson, ch.sahits.game.openpatrician.model.city.impl.TavernState tavernState, ch.sahits.game.openpatrician.model.IPlayer player)
showingPerson - person to talk totavernState - state of the tavernplayer - player instancepublic TavernDialogChangeAction getTavernChangeActionHandler(ch.sahits.game.openpatrician.model.people.IPerson showingPerson, ch.sahits.game.openpatrician.model.city.impl.TavernState tavernState, ch.sahits.game.openpatrician.model.IPlayer currentPlayer)
showingPerson - person to talk totavernState - state of the taverncurrentPlayer - player instancepublic IAttackListener getAttackListener(ch.sahits.game.openpatrician.model.ship.IShip ship, PatrolInternalState state)
ship - doing the patrolstate - patrol statepublic NextPatrolStation getNextPatrolStateion(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, IAttackListener atackListener)
ship - doing the patrrolcity - next citystate - current stateplayer - .deadline - until when the city has to be reachedatackListener - listener for attackspublic SinkConcurrentsShipOrder getSinkConcurrentsShipOrder(ch.sahits.game.openpatrician.model.IPlayer opponent, ch.sahits.game.openpatrician.model.IPlayer player, int offerdTime, int premium, ch.sahits.game.openpatrician.model.event.TimedTask reconciliation)
opponent - playerplayer - the order executorofferdTime - time to execute the taskpremium - on successful executionreconciliation - timer task for the reconcialiationpublic HirePirateEventHandler getHirePirateEventHandler(javafx.beans.property.ObjectProperty<ch.sahits.game.openpatrician.model.ship.IShip> currentShip, ch.sahits.game.openpatrician.client.ICityPlayerProxyJFX city, ch.sahits.game.openpatrician.model.people.IPirate pirate, ClosableDialog delegateDialog)
currentShip - to pass to the piratecity - current citypirate - .delegateDialog - dialog reference.Copyright © 2011-2015 Sahits GmbH. All Rights Reserved.