/// <summary> /// /// </summary> void Awake() { Manager = bl_SceneLoaderUtils.GetSceneLoaderManager(); //Setup Audio Source Source = GetComponent <AudioSource>(); Source.volume = 0; Source.loop = true; if (BackgroundAudio != null) { Source.clip = BackgroundAudio; } //Setup UI RootUI.SetActive(false); RootAlpha = RootUI.GetComponent <CanvasGroup>(); if (ContinueUI != null) { ContinueUI.SetActive(false); } if (FlashImage != null) { FlashImage.SetActive(false); } if (FadeImageCanvas != null) { FadeImageCanvas.alpha = 1; StartCoroutine(FadeOutCanvas(FadeImageCanvas)); } if (SkipKeyText != null) { SkipKeyText.SetActive(false); } if (LoadBarSlider != null) { LoadingBarAlpha = LoadBarSlider.GetComponent <CanvasGroup>(); } if (BackgroundImage != null) { BackgroundAlpha = BackgroundImage.GetComponent <CanvasGroup>(); } if (Manager.HasTips) { cacheTips = Manager.TipList; } if (FilledImage != null) { FilledImage.type = Image.Type.Filled; FilledImage.fillAmount = 0; } transform.SetAsLastSibling(); }
/// <summary> /// /// </summary> public void Init(bl_SceneLoader loader) { m_SceneLoader = loader; Manager = bl_SceneLoaderManager.Instance; RootAlpha = RootUI.GetComponent <CanvasGroup>(); if (LoadBarSlider != null) { LoadingBarAlpha = LoadBarSlider.GetComponent <CanvasGroup>(); } if (BackgroundImage != null) { BackgroundAlpha = BackgroundImage.GetComponent <CanvasGroup>(); } RootUI.SetActive(false); if (ContinueUI != null) { ContinueUI.SetActive(false); } if (FlashImage != null) { FlashImage.SetActive(false); } if (FadeImageCanvas != null) { FadeImageCanvas.alpha = 1; StartCoroutine(FadeOutCanvas(FadeImageCanvas)); } if (SkipKeyText != null) { SkipKeyText.SetActive(false); } if (Manager.HasTips) { cacheTips = Manager.TipList; } if (FilledImage != null) { FilledImage.type = Image.Type.Filled; FilledImage.fillAmount = 0; } Source.volume = 0; Source.loop = true; Source.clip = m_SceneLoader.BackgroundAudio; }