A 2D Farming RPG
This is just a simple 2D farming RPG game
Loading...
Searching...
No Matches
SceneControllerManager Class Reference

Manage the transition between scenes More...

Inheritance diagram for SceneControllerManager:
Inheritance graph
Collaboration diagram for SceneControllerManager:
Collaboration graph

Public Member Functions

void FadeAndLoadScene (string sceneName, Vector3 spawnPosition)
 This is the main externam point of contact and influence from the rest of the project. This will be called when the player wants to switch scenes. More...
 

Data Fields

SceneName m_StartingSceneName
 

Private Member Functions

IEnumerator Fade (float finalAlpha)
 Handle the fade in blocking and unblocking inputs. More...
 
IEnumerator FadeAndSwitchScenes (string sceneName, Vector3 spawnPosition)
 Handle fading, switching and unloading scenes. More...
 
IEnumerator LoadSceneAndSetActive (string sceneName)
 Load the scene and the activate it. Basically, we are additing our new scene to the Persistent scene. More...
 
IEnumerator Start ()
 Load the starting scene More...
 

Private Attributes

float m_FadeDuration = 1.0f
 
CanvasGroup m_FaderCanvasGroup = null
 
Image m_FaderImage = null
 
bool m_IsFading
 

Additional Inherited Members

- Protected Member Functions inherited from SingletonMonobehaviour< SceneControllerManager >
virtual void Awake ()
 
- Properties inherited from SingletonMonobehaviour< SceneControllerManager >
static T Instance [get]
 

Detailed Description

Manage the transition between scenes

Definition at line 10 of file SceneControllerManager.cs.

Member Function Documentation

◆ Fade()

IEnumerator SceneControllerManager.Fade ( float  finalAlpha)
inlineprivate

Handle the fade in blocking and unblocking inputs.

Parameters
finalAlpha
Returns

Definition at line 26 of file SceneControllerManager.cs.

Here is the caller graph for this function:

◆ FadeAndLoadScene()

void SceneControllerManager.FadeAndLoadScene ( string  sceneName,
Vector3  spawnPosition 
)
inline

This is the main externam point of contact and influence from the rest of the project. This will be called when the player wants to switch scenes.

Parameters
sceneName
spawnPosition

Definition at line 144 of file SceneControllerManager.cs.

Here is the call graph for this function:

◆ FadeAndSwitchScenes()

IEnumerator SceneControllerManager.FadeAndSwitchScenes ( string  sceneName,
Vector3  spawnPosition 
)
inlineprivate

Handle fading, switching and unloading scenes.

Parameters
sceneName
spawnPosition
Returns

Definition at line 60 of file SceneControllerManager.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ LoadSceneAndSetActive()

IEnumerator SceneControllerManager.LoadSceneAndSetActive ( string  sceneName)
inlineprivate

Load the scene and the activate it. Basically, we are additing our new scene to the Persistent scene.

Parameters
sceneName
Returns

Definition at line 102 of file SceneControllerManager.cs.

Here is the caller graph for this function:

◆ Start()

IEnumerator SceneControllerManager.Start ( )
inlineprivate

Load the starting scene

Returns

Definition at line 118 of file SceneControllerManager.cs.

Here is the call graph for this function:

Field Documentation

◆ m_FadeDuration

float SceneControllerManager.m_FadeDuration = 1.0f
private

Definition at line 13 of file SceneControllerManager.cs.

◆ m_FaderCanvasGroup

CanvasGroup SceneControllerManager.m_FaderCanvasGroup = null
private

Definition at line 14 of file SceneControllerManager.cs.

◆ m_FaderImage

Image SceneControllerManager.m_FaderImage = null
private

Definition at line 15 of file SceneControllerManager.cs.

◆ m_IsFading

bool SceneControllerManager.m_IsFading
private

Definition at line 17 of file SceneControllerManager.cs.

◆ m_StartingSceneName

SceneName SceneControllerManager.m_StartingSceneName

Definition at line 19 of file SceneControllerManager.cs.


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