Class MapLocationDetector
- java.lang.Object
-
- ch.sahits.game.openpatrician.engine.sea.MapLocationDetector
-
@Component @Lazy @DependentInitialisation(StartNewGameBean.class) public class MapLocationDetector extends java.lang.Object
- Author:
- Andi Hotz, (c) Sahits GmbH, 2015 Created on Dec 07, 2015
-
-
Field Summary
Fields Modifier and Type Field Description private AldermanOffice
aldermanOffice
private com.google.common.eventbus.AsyncEventBus
clientServerEventBus
private MapLocationDetectionModel
dataModel
private Date
date
private LocationTracker
locationTracker
private IMap
map
private MapProperties
mapProperties
private java.util.Random
rnd
private boolean
shipsUpdated
private com.google.common.eventbus.EventBus
syncServerClientEventBus
private com.google.common.eventbus.AsyncEventBus
timerEventBus
-
Constructor Summary
Constructors Constructor Description MapLocationDetector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkShipLeaving(ClockTick tick)
void
checkShipUpdate(ShipPositionUpdateEvent event)
(package private) void
handleShipLocationUpdate()
private void
init()
(package private) void
removeDefeatedShips(IConvoy ship, int survivingShips)
private void
unregister()
-
-
-
Field Detail
-
dataModel
@Autowired private MapLocationDetectionModel dataModel
-
clientServerEventBus
@Autowired @Qualifier("serverClientEventBus") private com.google.common.eventbus.AsyncEventBus clientServerEventBus
-
syncServerClientEventBus
@Autowired @Qualifier("syncServerClientEventBus") private com.google.common.eventbus.EventBus syncServerClientEventBus
-
timerEventBus
@Autowired @Qualifier("timerEventBus") private com.google.common.eventbus.AsyncEventBus timerEventBus
-
date
@Autowired private Date date
-
aldermanOffice
@Autowired private AldermanOffice aldermanOffice
-
map
@Autowired private IMap map
-
rnd
@Autowired private java.util.Random rnd
-
locationTracker
@Autowired private LocationTracker locationTracker
-
mapProperties
@Autowired private MapProperties mapProperties
-
shipsUpdated
private boolean shipsUpdated
-
-
Method Detail
-
init
@PostConstruct private void init()
-
unregister
@PreDestroy private void unregister()
-
checkShipUpdate
public void checkShipUpdate(ShipPositionUpdateEvent event)
-
handleShipLocationUpdate
void handleShipLocationUpdate()
-
checkShipLeaving
public void checkShipLeaving(ClockTick tick)
-
removeDefeatedShips
void removeDefeatedShips(IConvoy ship, int survivingShips)
-
-