private IEnumerator CollectionCompleteCoroutine() { DebugLog("[COLLECTION] CollectionCompleteCoroutine"); yield return(new WaitUntil(() => RootCamera.isActiveAndEnabled)); yield return(new WaitForSeconds(0.1f)); SceneActivationBehaviour <OverlayUISceneActivator> .Instance.ToggleBlocker(true); GoldLevelCardScript completedFinalGoldCard = (GoldLevelCardScript)levelBeingPlayed; // show fireworks and alien SoundController.Instance.PlayAudioClip(Settings.Autogenerated.SoundSettingsKey.Locationunlocked); SceneActivationBehaviour <CollectionOverlayActivator> .Instance.ShowCollectionViewAlien($"{GameConstants.MainGame.FeatureMessages.CollectionComplete}", true); yield return(new WaitForSeconds(0.5f)); SceneActivationBehaviour <CollectionOverlayActivator> .Instance.CelebrateAlien(); yield return(new WaitForSeconds(2f)); SceneActivationBehaviour <CollectionOverlayActivator> .Instance.HideCollectionViewAlien(); CallValues((int)completedFinalGoldCard.LevelLocale.x, (int)completedFinalGoldCard.LevelLocale.y, true, true); CleanUpCoroutine(); yield break; }
private IEnumerator GoldLevelCompleteCoroutine() { DebugLog("[COLLECTION] GoldLevelCompleteCoroutine"); yield return(new WaitUntil(() => RootCamera.isActiveAndEnabled)); yield return(new WaitForSeconds(0.1f)); // show gold level reveal animation SceneActivationBehaviour <OverlayUISceneActivator> .Instance.ToggleBlocker(true); GoldLevelCardScript completedGoldCard = (GoldLevelCardScript)levelBeingPlayed; completedGoldCard.Reveal(); int groupFromWhichGoldCardWasCompleted = (int)completedGoldCard.LevelLocale.x - 1; yield return(new WaitForSeconds(1.5f)); SceneActivationBehaviour <OverlayUISceneActivator> .Instance.ToggleBlocker(false); collectionOrigin.CheckGoldsForCollection(groupFromWhichGoldCardWasCompleted); CleanUpCoroutine(); yield break; }