![]() |
Eye of the Nile Docs
Everything you need to know to get started!
|
This goes on day/night shrines, which are objects that allow the player to change the time of day when interacted with (press E). If the player interacts with this object, it will tell the DataManager to update its record of the time of day. The DataManager will then trigger an event that tells TimeOfDayController to change the background image. This script is also used for controlling whether or not the shrine should be animated when the player gets in range.
Documentation updated 4/7/2025
Public Types | |
enum | ShrineType { Day , Night } |
Possible types of shrines. More... | |
Public Member Functions | |
void | shrineTrigger () |
Depending on the type of shrine this is, set the DataManager's record of the time of day to the corresponding time of day. This function is attached to an ObjectInteractable component to allow the player to trigger it by pressing E near the shrine. | |
void | playerNearShrine () |
If the player is within close proximity to the shrine, make it animated only if the time of day is right. | |
void | playerAwayFromShrine () |
If the player leaves the shrine's range, make it not animated. | |
Public Attributes | |
ShrineType | shrineType = ShrineType.Day |
The type of shrine this shrine is. | |
Private Member Functions | |
void | Awake () |
Set reference to DataManager and the Animator. | |
Private Attributes | |
DataManager | dataManager |
Referene to the DataManager. | |
Animator | animator |
Reference to the shrine's animator. | |
|
private |
Set reference to DataManager and the Animator.
void DayNight_Shrine.playerAwayFromShrine | ( | ) |
If the player leaves the shrine's range, make it not animated.
void DayNight_Shrine.playerNearShrine | ( | ) |
If the player is within close proximity to the shrine, make it animated only if the time of day is right.
void DayNight_Shrine.shrineTrigger | ( | ) |
Depending on the type of shrine this is, set the DataManager's record of the time of day to the corresponding time of day. This function is attached to an ObjectInteractable component to allow the player to trigger it by pressing E near the shrine.
|
private |
Reference to the shrine's animator.
|
private |
Referene to the DataManager.
ShrineType DayNight_Shrine.shrineType = ShrineType.Day |
The type of shrine this shrine is.