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 newOverlay
with the givenSpriteBatch
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Overlay
createGameOverMenu()
Creates a blankGameOverMenu
with thebatch
Overlay
createHUD(MetricController.Metric[] leftMetrics, MetricController.Metric[] rightMetrics)
Creates a heads-up display with the given left and right metric labelsOverlay
createPauseMenu()
-
-
-
Field Detail
-
batch
private final com.badlogic.gdx.graphics.g2d.SpriteBatch batch
TheSpriteBatch
with whichOverlay
instances should be constructed
-
-
Method Detail
-
createGameOverMenu
public Overlay createGameOverMenu()
Creates a blankGameOverMenu
with 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.Metric
items - See Also:
HeadsUpDisplay
-
-