Class MainGameScene

    • Field Detail

      • MAP_OVERVIEW_HEIGHT

        private static final int MAP_OVERVIEW_HEIGHT
        Height of the map overview.
        See Also:
        Constant Field Values
      • LEFT_STATUS_PANEL_WIDTH

        private static final int LEFT_STATUS_PANEL_WIDTH
        Width of the left panels (without borders).
        See Also:
        Constant Field Values
      • TOP_STATUS_HEIGHT

        static final int TOP_STATUS_HEIGHT
        Height of the top status bar.
        See Also:
        Constant Field Values
      • BORDER_SPACING

        private static final int BORDER_SPACING
        Width/height of the border.
        See Also:
        Constant Field Values
      • HORIZONTAL_DECO_HEIGHT

        private static final int HORIZONTAL_DECO_HEIGHT
        Height of the horizontal fries.
        See Also:
        Constant Field Values
      • NOTICE_HEIGHT

        static final int NOTICE_HEIGHT
        Height of the notice view.
        See Also:
        Constant Field Values
      • LEFT_PANEL_WIDTH

        static final int LEFT_PANEL_WIDTH
        Width og the left panels inclusive borders.
        See Also:
        Constant Field Values
      • MINMIMAL_DISPLAY_HEIGHT

        static final int MINMIMAL_DISPLAY_HEIGHT
        The minimal height the display must have
        See Also:
        Constant Field Values
      • clientServerEventBus

        @Autowired
        @Qualifier("serverClientEventBus")
        private com.google.common.eventbus.AsyncEventBus clientServerEventBus
      • foreground

        private javafx.scene.Group foreground
      • miniMap

        private final MiniMap miniMap
    • Method Detail

      • initializeEventSystem

        @PostConstruct
        private void initializeEventSystem()
      • unregister

        @PreDestroy
        private void unregister()
      • initializeGameView

        public void initializeGameView​(NewGameClient newGameDTO)
        Event handler for initializing the new game when the server is done.
        Parameters:
        newGameDTO - data transfer object.
      • calculateMainGameViewHeight

        private double calculateMainGameViewHeight​(double height)
      • calculateMainGameViewWidth

        private double calculateMainGameViewWidth​(double width)
      • widthChange

        public void widthChange​(double oldWidth,
                                double newWidth)
        Description copied from class: OpenPatricianScene
        Method that is called when the width of the scene changes. Subclasses that need to be aware of size changes should override this method.
        Overrides:
        widthChange in class OpenPatricianScene
        Parameters:
        oldWidth - old width of the scene
        newWidth - new width of the scene
      • heightChange

        public void heightChange​(double oldHeight,
                                 double newHeigth)
        Description copied from class: OpenPatricianScene
        Method that is called when the height of the scene changes. Subclasses that need to be aware of size changes should override this method.
        Overrides:
        heightChange in class OpenPatricianScene
        Parameters:
        oldHeight - old height of the scene
        newHeigth - new height of the scene