public class MainGameScene extends OpenPatricianScene
| Modifier and Type | Field and Description |
|---|---|
private MainGameSceneBackground |
background |
private static int |
BORDER_SPACING
Width/height of the border.
|
private com.google.common.eventbus.AsyncEventBus |
clientServerEventBus |
private IJavaFXControlLoader |
controlLoader |
private javafx.scene.Group |
foreground |
private GameStatus |
gameStatus |
private static int |
HORIZONTAL_DECO_HEIGHT
Height of the horizontal fries.
|
(package private) static int |
LEFT_PANEL_WIDTH
Width og the left panels inclusive borders.
|
private static int |
LEFT_STATUS_PANEL_WIDTH
Width of the left panels (without borders).
|
private MainGameView |
mainGameView |
private static int |
MAP_OVERVIEW_HEIGHT
Height of the map overview.
|
(package private) static int |
MENU_HEIGHT
Height of the menu bar.
|
private MiniMap |
miniMap |
(package private) static int |
MINMIMAL_DISPLAY_HEIGHT
The minimal height the display must have
|
(package private) static int |
NOTICE_HEIGHT
Height of the notice view.
|
(package private) static int |
TOP_STATUS_HEIGHT
Height of the top status bar.
|
private ViewStatus |
viewStatus |
| Constructor and Description |
|---|
MainGameScene(double width,
double height,
IImageLoader loader,
IJavaFXControlLoader controlLoader) |
| Modifier and Type | Method and Description |
|---|---|
private double |
calculateMainGameViewHeight(double height) |
private double |
calculateMainGameViewWidth(double width) |
void |
heightChange(double oldHeight,
double newHeigth) |
private void |
initializeEventSystem() |
void |
initializeGameView(ch.sahits.game.openpatrician.event.data.NewGameClient newGameDTO)
Event handler for initializing the new game when the server is done.
|
private void |
unregister() |
void |
widthChange(double oldWidth,
double newWidth) |
getRootprivate static final int MAP_OVERVIEW_HEIGHT
private static final int LEFT_STATUS_PANEL_WIDTH
static final int TOP_STATUS_HEIGHT
private static final int BORDER_SPACING
private static final int HORIZONTAL_DECO_HEIGHT
static final int MENU_HEIGHT
static final int NOTICE_HEIGHT
static final int LEFT_PANEL_WIDTH
static final int MINMIMAL_DISPLAY_HEIGHT
private MainGameSceneBackground background
private GameStatus gameStatus
private ViewStatus viewStatus
private MainGameView mainGameView
@Autowired @Qualifier(value="serverClientEventBus") private com.google.common.eventbus.AsyncEventBus clientServerEventBus
private IJavaFXControlLoader controlLoader
private javafx.scene.Group foreground
private final MiniMap miniMap
public MainGameScene(double width,
double height,
IImageLoader loader,
IJavaFXControlLoader controlLoader)
@PostConstruct private void initializeEventSystem()
@PreDestroy private void unregister()
public void initializeGameView(ch.sahits.game.openpatrician.event.data.NewGameClient newGameDTO)
newGameDTO - data transfer object.private double calculateMainGameViewHeight(double height)
private double calculateMainGameViewWidth(double width)
public void widthChange(double oldWidth,
double newWidth)
widthChange in class OpenPatricianScenepublic void heightChange(double oldHeight,
double newHeigth)
heightChange in class OpenPatricianSceneCopyright © 2011-2018 Sahits GmbH. All Rights Reserved.