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

Detailed Description

Loads a given Unity scene when a player goes through a warp/door or dies. This also handles the black fade transition.

Documentation updated 9/15/2024

Author
Roy Pascual

Public Member Functions

void LoadNewStage (string newStageName)
 

Public Attributes

Animator fadeAnimator
 Reference to the animator responsible for the fate-to-black animation we want to play when loading a new scene.
 
ActiveAbilityData activeAbilities
 Reference to the ActiveAbilityData object.
 

Properties

Dictionary< string, StageWarpStageWarps [get, set]
 Dictionary linking each StageWarp object to its name.
 

Private Member Functions

void InitializeWarps ()
 Populate the dictionary with every StageWarp in the scene and their names.
 
IEnumerator TransitionToNewStage (string newStageName)
 Starts the fade animation, waits one second for the animation to end, then loads the new scene.
 
void Awake ()
 Run InitializeWarps().
 
void Start ()
 

Private Attributes

DataManager dataManager
 Reference to the DataManager.
 

Member Function Documentation

◆ Awake()

void StageLoader.Awake ( )
private

◆ InitializeWarps()

void StageLoader.InitializeWarps ( )
private

Populate the dictionary with every StageWarp in the scene and their names.

◆ LoadNewStage()

void StageLoader.LoadNewStage ( string newStageName)

Parses the given stage name, changing it if it's a stand-in for another scene name ("this" = this scene, "RESPAWN" = scene of respawn point). Then, it runs a coroutine for TransitionToNewStage().

◆ Start()

void StageLoader.Start ( )
private

◆ TransitionToNewStage()

IEnumerator StageLoader.TransitionToNewStage ( string newStageName)
private

Starts the fade animation, waits one second for the animation to end, then loads the new scene.

Todo
Wait time for fade transition should not be hardcoded, but instead a variable.

Member Data Documentation

◆ activeAbilities

ActiveAbilityData StageLoader.activeAbilities

Reference to the ActiveAbilityData object.

◆ dataManager

DataManager StageLoader.dataManager
private

Reference to the DataManager.

◆ fadeAnimator

Animator StageLoader.fadeAnimator

Reference to the animator responsible for the fate-to-black animation we want to play when loading a new scene.

Property Documentation

◆ StageWarps

Dictionary<string, StageWarp> StageLoader.StageWarps
getset

Dictionary linking each StageWarp object to its name.


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