Cutscenes - UQcsse3200/2024-studio-3 GitHub Wiki
The cutscenes feature incorporates all 'cinematic' events which happen in the game due to the player reaching a good or bad ending or some other unique event happening. There is currently one implemented cutscenes with two variations, one for a good ending and one for a bad ending.
The cutscenes work by being called from the main game space and spawning a unique, scripted NPC who moves down the left side of the play area. A textbox is then created which holds dialogue indicating whether the player has gotten a good or bad ending.
Pig Boss NPC who appears during the cutscene.
Source: Team 6
triggerFiredEnd()
triggers the fired ending. It creates a separate thread which uses the spawnBoss()
function to create a boss entity which is set to move down. The thread waits for the boss to move before using createTextBox()
to indicate which of the two endings it is. Then app.exit()
is called to exit the game, as it has concluded.
triggerRaiseEnd()
triggers the raise ending. It functions in the same way as triggerFiredEnd()
just with different content in the text box.