-
Notifications
You must be signed in to change notification settings - Fork 2
End of Day Display
End of Day Display by Team 8
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.
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](https://private-user-images.githubusercontent.com/126844880/362502645-dbc9924b-2c1f-4e76-aa44-1ea69762aa7a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyMjM1MjMsIm5iZiI6MTczOTIyMzIyMywicGF0aCI6Ii8xMjY4NDQ4ODAvMzYyNTAyNjQ1LWRiYzk5MjRiLTJjMWYtNGU3Ni1hYTQ0LTFlYTY5NzYyYWE3YS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMFQyMTMzNDNaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1hYWI0MzNjMjYzMzk4OTI1NGM1N2E5YzdiNjRkYjMwZjlhMmFlZjA5ZjI1ZjdjZTY4NWNiNzRiNDFiYmU1YmZhJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.XujAYiku57o06b6n7GUhBQvFFOSvhKxdG_xSuT3TAVo)
UPDATED
UPDATED
UML UPDATED
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
Entities and Components
Input Handling
Game Screens and Areas
Fire Extinguisher Handler Component
MainGameActions Create Docket Triggers
Main Game Order Button Display
BackstoryCutsceneDisplay Test Plan
Test Plan for MainGameOrderTicketDisplay
Test Plan for MainGameOrderBtnDisplay
Test Plan for DocketLineDisplay
Test plan for RandomComboService
Test plan for SpeedBoostUpgrade
Test plan for DancePartyUpgrade