Eye of the Nile Docs
Everything you need to know to get started!
Loading...
Searching...
No Matches
DayNight_Shrine Class Reference

Detailed Description

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

Author
Stephen Nuttall

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.
 

Member Enumeration Documentation

◆ ShrineType

Possible types of shrines.

Enumerator
Day 

Day shrine (Shrine of Ra) allows the player to change the time of day to day time.

Night 

Night shrine (Shrine of Thoth) allows the player to change the time of day to night time.

Member Function Documentation

◆ Awake()

void DayNight_Shrine.Awake ( )
private

Set reference to DataManager and the Animator.

◆ playerAwayFromShrine()

void DayNight_Shrine.playerAwayFromShrine ( )

If the player leaves the shrine's range, make it not animated.

◆ playerNearShrine()

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.

◆ shrineTrigger()

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.

Member Data Documentation

◆ animator

Animator DayNight_Shrine.animator
private

Reference to the shrine's animator.

◆ dataManager

DataManager DayNight_Shrine.dataManager
private

Referene to the DataManager.

◆ shrineType

ShrineType DayNight_Shrine.shrineType = ShrineType.Day

The type of shrine this shrine is.


The documentation for this class was generated from the following file: