Open riotanabe opened 1 year ago
Instructions from Team 3 on discord [13/10]:
" first you need to import the package: 'import com.deco2800.game.components.endingmenu.EndingMenuDisplay;' then call the setlose function: 'EndingMenuDisplay.setLose();' finally set the screen: 'entity.getEvents().trigger("ending");' "
Tried this exact method in our update method in countdownDisplay.java:
` if (this.timeRemaining <= 0) { counterLabel.setText("GAME OVER!");
game.theGameScreen.changeStatus();
EndingMenuDisplay.setLose();
entity.getEvents().trigger("ending");
}
`
But this caused the game to break when the timer runs out.
timeTime is a boolean value of whether there is time remaining or not. When timeTime is false i.e., time has run out, the "judge" variable in EndingMenuDisplay will be setLose() as per team 3's instruction, the will switch screens in to GdxGame.ScreenType.ENDING.
Description
Task: Take players to losing screen if timer runs out. Feature: Countdown Clock (#3 )
Players should be taken to the losing screen made by Team 3, when the countdown timer runs out which indicates the player has lost the game. Discussion should be made with team 3 to understand how we can access their methods and successfully change the screen.
Dependencies
Completion Deadline: Oct. 18
Member