Class OverlayFactory
- java.lang.Object
-
- bytemusketeers.heslingtonhustle.ui.OverlayFactory
-
public final class OverlayFactory extends java.lang.Object- Author:
- ENG1 Team 23 (Cohort 3)
-
-
Constructor Summary
Constructors Constructor Description OverlayFactory(com.badlogic.gdx.graphics.g2d.SpriteBatch batch)Constructs a newOverlaywith the givenSpriteBatch
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OverlaycreateGameOverMenu()Creates a blankGameOverMenuwith thebatchOverlaycreateHUD(MetricController.Metric[] leftMetrics, MetricController.Metric[] rightMetrics)Creates a heads-up display with the given left and right metric labelsOverlaycreatePauseMenu()
-
-
-
Field Detail
-
batch
private final com.badlogic.gdx.graphics.g2d.SpriteBatch batch
TheSpriteBatchwith whichOverlayinstances should be constructed
-
-
Method Detail
-
createGameOverMenu
public Overlay createGameOverMenu()
Creates a blankGameOverMenuwith thebatch- Returns:
- A new
GameOverMenu - See Also:
GameOverMenu
-
createHUD
public Overlay createHUD(MetricController.Metric[] leftMetrics, MetricController.Metric[] rightMetrics)
Creates a heads-up display with the given left and right metric labels- Parameters:
leftMetrics- Metrics to display on the LHS of the HUDrightMetrics- Metrics to display on the RHS of the HUD- Returns:
- A new
HeadsUpDisplay, prepared to display the givenMetricController.Metricitems - See Also:
HeadsUpDisplay
-
-