public void SwitchScene(string sceneName) { if (!inTransition) { inTransition = true; newAlpha = 0f; titCardSceneTrans = true; fadeSceneOut = true; sceneToLoad = sceneName; seasonCadreScript = seasonCadreManScript.GetCadreInfo(sceneName); titleCardImg.sprite = seasonCadreScript.cadreSprite; //titleCardFadeScript.img = titleCardImg; foreach (ParticleSystem partSys in seasonCadreScript.cadreParticles) { partSys.Play(); } if (audioTransScript != null) { audioTransScript.TransitionScenes(sceneName); } else { audioTransScript = GameObject.FindWithTag("Audio").GetComponent <AudioTransitions>(); if (audioTransScript != null) { audioTransScript.TransitionScenes(sceneName); } } } }
public void SwitchSceneWhiteFade(string sceneName) { if (!inTransition) { inTransition = true; newAlpha = 0f; whtSceneTrans = true; fadeSceneOut = true; sceneToLoad = sceneName; if (audioTransScript != null) { audioTransScript.TransitionScenes(sceneName); } else { audioTransScript = GameObject.FindWithTag("Audio").GetComponent <AudioTransitions>(); if (audioTransScript != null) { audioTransScript.TransitionScenes(sceneName); } } } }