public class CityPlayerProxyJFX extends Object implements ch.sahits.game.openpatrician.client.ICityPlayerProxyJFX
| Modifier and Type | Field and Description |
|---|---|
private ch.sahits.game.openpatrician.model.ship.INavigableVessel |
activeShip
Reference the active ship of the player
|
private ch.sahits.game.openpatrician.model.city.ICity |
city |
private com.google.common.eventbus.AsyncEventBus |
clientServerEventBus |
private DependentAnnotationConfigApplicationContext |
context |
private ch.sahits.game.openpatrician.model.IHumanPlayer |
player |
private javafx.beans.binding.ListBinding<ch.sahits.game.openpatrician.model.ship.IShip> |
playersShips |
private javafx.collections.ObservableList<ch.sahits.game.openpatrician.model.ship.INavigableVessel> |
playersVessels
List holding all ships owned by the player currently present in the city
|
| Constructor and Description |
|---|
CityPlayerProxyJFX(ch.sahits.game.openpatrician.model.city.ICity city,
ch.sahits.game.openpatrician.model.IHumanPlayer player,
ch.sahits.game.openpatrician.model.ship.INavigableVessel activeShip)
/**
Constructor initializing the city and the player with one ship in port.
|
| Modifier and Type | Method and Description |
|---|---|
void |
activateShip(ch.sahits.game.openpatrician.model.ship.INavigableVessel ship)
Activate a ship.
|
void |
arrive(ch.sahits.game.openpatrician.model.ship.INavigableVessel ship)
A ship arrives in the city
|
javafx.collections.ObservableList<ch.sahits.game.openpatrician.model.ship.INavigableVessel> |
getPlayersNavalVessels() |
javafx.collections.ObservableList<ch.sahits.game.openpatrician.model.ship.IShip> |
getPlayersShips() |
void |
handleShipBecomesUnavailable(ch.sahits.game.event.data.ShipBecomesUnavailableEvent event) |
void |
handleShipEntersPort(ch.sahits.game.event.data.ShipEntersPortEvent event) |
void |
handleShipLeavesPort(ch.sahits.game.event.data.ShipLeavingPort event) |
void |
leave(ch.sahits.game.openpatrician.model.ship.INavigableVessel ship)
Ship leave the city
|
void |
postLoad()
Execute after savegame was loaded triggered from the ClientViewState.
|
private void |
register() |
private void |
unregister() |
private ch.sahits.game.openpatrician.model.city.ICity city
private ch.sahits.game.openpatrician.model.IHumanPlayer player
private javafx.collections.ObservableList<ch.sahits.game.openpatrician.model.ship.INavigableVessel> playersVessels
private javafx.beans.binding.ListBinding<ch.sahits.game.openpatrician.model.ship.IShip> playersShips
@Autowired @Qualifier(value="serverClientEventBus") private com.google.common.eventbus.AsyncEventBus clientServerEventBus
private ch.sahits.game.openpatrician.model.ship.INavigableVessel activeShip
@Autowired private DependentAnnotationConfigApplicationContext context
public CityPlayerProxyJFX(ch.sahits.game.openpatrician.model.city.ICity city,
ch.sahits.game.openpatrician.model.IHumanPlayer player,
ch.sahits.game.openpatrician.model.ship.INavigableVessel activeShip)
city - player - activeShip - @PostConstruct private void register()
@PreDestroy private void unregister()
public void activateShip(ch.sahits.game.openpatrician.model.ship.INavigableVessel ship)
IllegalArgumentException will be thrownactivateShip in interface ch.sahits.game.openpatrician.client.ICityPlayerProxyJFXship - IllegalArgumentException - if the ship cannot be activated due to its non existencepublic javafx.collections.ObservableList<ch.sahits.game.openpatrician.model.ship.INavigableVessel> getPlayersNavalVessels()
getPlayersNavalVessels in interface ch.sahits.game.openpatrician.client.ICityPlayerProxyJFXpublic void arrive(ch.sahits.game.openpatrician.model.ship.INavigableVessel ship)
arrive in interface ch.sahits.game.openpatrician.client.ICityPlayerProxyJFXship - public void leave(ch.sahits.game.openpatrician.model.ship.INavigableVessel ship)
leave in interface ch.sahits.game.openpatrician.client.ICityPlayerProxyJFXship - public javafx.collections.ObservableList<ch.sahits.game.openpatrician.model.ship.IShip> getPlayersShips()
getPlayersShips in interface ch.sahits.game.openpatrician.client.ICityPlayerProxyJFXpublic void handleShipLeavesPort(ch.sahits.game.event.data.ShipLeavingPort event)
public void handleShipEntersPort(ch.sahits.game.event.data.ShipEntersPortEvent event)
public void handleShipBecomesUnavailable(ch.sahits.game.event.data.ShipBecomesUnavailableEvent event)
public void postLoad()
Copyright © 2011-2017 Sahits GmbH. All Rights Reserved.