Skip to content

End of Day Display

Marcus Baulch edited this page Oct 16, 2024 · 28 revisions

End of Day Display by Team 8

Description

The end of day screen is to provide players with a comprehensive overview of their day’s performance as well as prompt a moral decision (that will affect future gameplay). This screen provides key metrics such as the current time of the system, amount of money gained or lost, number of orders fulfilled and unfulfilled. The summary is designed to encourage players to analyse their gameplay, helping them understand how efficiently they can manage orders and customer interactions, as well as make a moral decision that will either aid or hinder the gameplay experience.

EndDayDisplay

The EndDayDisplay class is intended to display to the player their end of day summary in which a moral decision will also be made. The objective of this task is to stop the player from moving and display a screen once 'p' is pressed. This task extends UIComponent.

Key Components and Fields

  • layout (Table): The main layout manager that organizes the UI elements on the screen.
  • isVisible (boolean): Tracks whether the end-of-day screen is currently visible.
  • gameScreen (MainGameScreen): Reference to the main game screen, allowing interaction with the game state (e.g., pausing and resuming the game).
  • game (GdxGame): The game instance, used for transitioning between different game screens or states.
  • birdImage, pointImage1, pointImage2, pointImage3 (Image): Visual elements that animate across the screen when displayed.
  • goldLabel (Label): Displays the amount of gold the player has earned. It animates the change in gold value when updated.
  • currentGold (int): The current amount of gold earned by the player.
  • STARTING_GOLD (int): Initial gold amount at the beginning of the day, set to the current level’s starting gold.

Constructor

  • EndDayDisplay(): Constructs a new instance of the end-of-day screen. It sets the initial gold amount and registers event listeners to handle gold updates, customer spawns, and screen visibility.

Method

  • create(): Initializes the layout and UI elements, setting up the background, images, and customer lists. It also sets up event listeners to respond to game events such as the end of the day and gold updates.
  • show(): Makes the end-of-day screen visible. It pauses the game, animates the bird image, and starts the gold change animation.
  • hide(): Hides the end-of-day screen, resumes the game, and transitions to the next phase (such as the next day or moral decision screen).
  • toggleVisibility(): Toggles between showing and hiding the end-of-day screen.
  • handleGoldUpdate(int gold): Updates the displayed gold value based on the new amount of gold passed via an event.
  • setupImages(): Loads and positions the bird image and other visual elements on the screen.
  • setupUI(): Sets up the primary UI layout, including the gold display and customer lists.
  • updateCustomerList(String customerName): Adds a new customer name to the list of customers and updates the UI.
  • animateGoldChange(): Animates the transition from the starting gold amount to the current gold amount.
Screenshot 2024-08-29 at 11 40 18 am

UPDATED Screenshot 2024-09-12 at 4 44 19 am

UPDATED 截屏2024-10-03 下午1 38 31

UML

UML UPDATED oo

Sequence Diagram

Sequence Diagram day

Table of Contents

Home

Team Design Document

Game Features

Inventory System
Scoring System
Food Recipes
Level System
Player Actions
Ordering System
Stations
Items
Map Design
Customers
Pause Menu
Upgrades
End of Day Display
Day Night Cycle
Moral System
Debug Terminal
Game Interactions Tutorial
Backstory Cutscenes

Game

Getting Started

Entities and Components

World Backstory

Service Locator

Loading Resources

Logging

Unit Testing

Debug Terminal

Input Handling

UI

Animations

Audio

AI

Physics

Game Screens and Areas

Terrain

Concurrency & Threading

Settings

Map Design

Test Plans

Sensor Component

Customer Sensor Component

Interaction Component

Inventory Component

Inventory Display

Station Meal Component

Station Progress Display

Keyboard Input Component

Fire Extinguisher Handler Component

Score System

HoverBox Component

MainGameActions Create Docket Triggers

End Day Display Component

Cutscene Area

Docket

Docket Line Display

Docket Meal Display

Main Game Order Button Display

Order Actions

Recipe

Ticket Details Component

BackstoryCutscene Test Plan

BackstoryCutsceneDisplay Test Plan

Test Plan for Tutorial

Keybinds

Keybinds Test Plan

Test Plan for MainGameOrderTicketDisplay

Test Plan for MainGameOrderBtnDisplay

Test Plan for Docket

Test Plan for DocketLineDisplay

Test Plan for OrderActions

Ticket Details

Test plan for RandomComboService

Test plan for LoanUpgrade

Test plan for UpgradesDisplay

Test plan for RageUpgrade

Test plan for SpeedBoostUpgrade

Test plan for DancePartyUpgrade

Test plan for ExtortionUpgrade

Troubleshooting

MacOS Setup Guide

Clone this wiki locally