![]() |
Eye of the Nile Docs
Everything you need to know to get started!
|
This script is responsible for displaying the joke that Anubis is supposed to tell when the player dies (stored in the DataManager) in the speech bubble above Anubis' head.
Documentation updated 9/3/2024
Public Attributes | |
TMP_Text | textbox |
Reference to the textbox inside the speech bubble that needs to be modified. | |
string[] | defaultJokes |
List of the default jokes Anubis can tell. These are told if there's no specialized joke given from the object that killed the player. | |
string[] | fireDeathJokes |
List of the default jokes Anubis can tell specifically if the player burns to death. The object that set the player on fire does not know when the player succumbs to the fire damage, so the list needs to be kept here. | |
Private Member Functions | |
void | Awake () |
Wait 1/100th of a second before displaying the joke. This allows Awake() in the DataManager to run its course first, so the correct data is used. | |
IEnumerator | Delay () |
Waits 0.01 seconds, then updates the textbox. | |
void | UpdateTextbox () |
Gets the joke to display from the DataManager, and set the text in the speech bubble to match it. If the joke is [DEFAULT] or [FIRE], we need to choose a joke ourselves from the corresponding list. | |
Private Attributes | |
string | deathMessage |
|
private |
Wait 1/100th of a second before displaying the joke. This allows Awake() in the DataManager to run its course first, so the correct data is used.
|
private |
Waits 0.01 seconds, then updates the textbox.
|
private |
Gets the joke to display from the DataManager, and set the text in the speech bubble to match it. If the joke is [DEFAULT] or [FIRE], we need to choose a joke ourselves from the corresponding list.
|
private |
string [] AnubisJokeTextbox.defaultJokes |
List of the default jokes Anubis can tell. These are told if there's no specialized joke given from the object that killed the player.
string [] AnubisJokeTextbox.fireDeathJokes |
List of the default jokes Anubis can tell specifically if the player burns to death. The object that set the player on fire does not know when the player succumbs to the fire damage, so the list needs to be kept here.
TMP_Text AnubisJokeTextbox.textbox |
Reference to the textbox inside the speech bubble that needs to be modified.