Ejemplo n.º 1
0
        private IEnumerator NewLocationUnlockedCoroutine()
        {
            DebugLog("[COLLECTION] NewLocationUnlockedCoroutine");
            yield return(new WaitUntil(() => RootCamera.isActiveAndEnabled));

            yield return(new WaitForSeconds(0.1f));

            // reveal finished level
            // show collection complete

            newLocationUnlocked = true;
            SceneActivationBehaviour <OverlayUISceneActivator> .Instance.ToggleBlocker(true);

            completedCard = (LevelCardScript)levelBeingPlayed;
            completedCard.Reveal();
            yield return(new WaitForSeconds(1.5f));

            // show fireworks and alien
            SoundController.Instance.PlayAudioClip(Settings.Autogenerated.SoundSettingsKey.Locationunlocked);
            SceneActivationBehaviour <CollectionOverlayActivator> .Instance.ShowCollectionViewAlien($"{GameConstants.MainGame.FeatureMessages.NewLocationUnlocked}");

            yield return(new WaitForSeconds(0.5f));

            int playerCoins = SceneActivationBehaviour <GameLogicActivator> .Instance.GameController.Player.Coins;

            SceneActivationBehaviour <UICoinCounterActivator> .Instance.CoinCounterClaim(playerCoins, 50, 0.1f);

            SceneActivationBehaviour <CollectionOverlayActivator> .Instance.CelebrateAlien();

            yield return(new WaitForSeconds(2f));

            SceneActivationBehaviour <CollectionOverlayActivator> .Instance.HideCollectionViewAlien();

            InterfaceController.Instance.Hide(GameWindow.CollectionScreen);
            SceneActivationBehaviour <MainMenuActivator> .Instance.TransitionAnimation();

            yield return(new WaitUntil(() => RootCamera.isActiveAndEnabled));

            SceneActivationBehaviour <OverlayUISceneActivator> .Instance.ToggleBlocker(true);

            yield return(new WaitForSeconds(0.5f));

            collectionOrigin.ShowGoldCardsUnlocking(SceneActivationBehaviour <GameLogicActivator> .Instance.GameController.Player.GroupIndex - 1);
            yield return(new WaitForSeconds(1.25f));

            CallValues(nextLevelCard.LevelLocale.x, nextLevelCard.LevelLocale.y, true);
            newLocationUnlocked = false;

            CleanUpCoroutine();
            yield break;
        }
Ejemplo n.º 2
0
        private IEnumerator NextLevelInOrderCompleteCoroutine()
        {
            DebugLog("[COLLECTION] NextLevelInOrderCompleteCoroutine");
            yield return(new WaitUntil(() => RootCamera.isActiveAndEnabled));

            yield return(new WaitForSeconds(0.1f));

            // show level just completed reveal animation
            SceneActivationBehaviour <OverlayUISceneActivator> .Instance.ToggleBlocker(true);

            completedCard = (LevelCardScript)levelBeingPlayed;
            completedCard.Reveal();
            yield return(new WaitForSeconds(0.5f));

            CallValues(nextLevelCard.LevelLocale.x, nextLevelCard.LevelLocale.y, true);
            SceneActivationBehaviour <GameLogicActivator> .Instance.FtueController.FilmIntroductionFtueStep();

            CleanUpCoroutine();
            yield break;
        }
Ejemplo n.º 3
0
        private IEnumerator GameCompleteCoroutine()
        {
            DebugLog("[COLLECTION] GameCompleteCoroutine");
            yield return(new WaitUntil(() => RootCamera.isActiveAndEnabled));

            yield return(new WaitForSeconds(0.1f));

            SceneActivationBehaviour <OverlayUISceneActivator> .Instance.ToggleBlocker(true);

            completedCard = (LevelCardScript)levelBeingPlayed;
            completedCard.Reveal();
            yield return(new WaitForSeconds(1.5f));

            // show fireworks and alien
            SoundController.Instance.PlayAudioClip(Settings.Autogenerated.SoundSettingsKey.Locationunlocked);
            SceneActivationBehaviour <CollectionOverlayActivator> .Instance.ShowCollectionViewAlien($"{GameConstants.MainGame.FeatureMessages.AllCollectionsComplete}", true);

            yield return(new WaitForSeconds(0.5f));

            SceneActivationBehaviour <CollectionOverlayActivator> .Instance.CelebrateAlien();

            yield return(new WaitForSeconds(2f));

            SceneActivationBehaviour <OverlayUISceneActivator> .Instance.ToggleBlocker(false);

            SceneActivationBehaviour <CollectionOverlayActivator> .Instance.HideCollectionViewAlien();

            collectionOrigin.ShowGoldCardsUnlocking(SceneActivationBehaviour <GameLogicActivator> .Instance.GameController.Player.GroupIndex);
            yield return(new WaitForSeconds(1.5f));

            SceneActivationBehaviour <OverlayUISceneActivator> .Instance.ToggleBlocker(false);

            SceneActivationBehaviour <PopupGameCompleteActivator> .Instance.ShowGameCompletePopup(() =>
            {
                return;
            });

            CleanUpCoroutine();
            yield break;
        }
Ejemplo n.º 4
0
        private IEnumerator FirstEverLocationUnlockedCoroutine()
        {
            DebugLog("[COLLECTION] FirstEverLocationUnlockedCoroutine");
            yield return(new WaitUntil(() => RootCamera.isActiveAndEnabled));

            yield return(new WaitForSeconds(0.1f));

            // reveal finished level
            // show collection complete

            newLocationUnlocked = true;
            SceneActivationBehaviour <OverlayUISceneActivator> .Instance.ToggleBlocker(true);

            completedCard = (LevelCardScript)levelBeingPlayed;
            completedCard.Reveal();
            yield return(new WaitForSeconds(1.5f));

            // show fireworks and alien
            SoundController.Instance.PlayAudioClip(Settings.Autogenerated.SoundSettingsKey.Locationunlocked);
            SceneActivationBehaviour <CollectionOverlayActivator> .Instance.ShowCollectionViewAlien($"{GameConstants.MainGame.FeatureMessages.NewLocationUnlocked}");

            yield return(new WaitForSeconds(0.5f));

            SceneActivationBehaviour <CollectionOverlayActivator> .Instance.CelebrateAlien();

            yield return(new WaitForSeconds(2f));

            SceneActivationBehaviour <CollectionOverlayActivator> .Instance.HideCollectionViewAlien();

            InterfaceController.Instance.Hide(GameWindow.CollectionScreen);
            SceneActivationBehaviour <MainMenuActivator> .Instance.TransitionAnimation();

            yield return(new WaitUntil(() => RootCamera.isActiveAndEnabled));

            newLocationUnlocked = false;

            CleanUpCoroutine();
            yield break;
        }
Ejemplo n.º 5
0
 public void SendNextLevelToBePlayed(RuleSettings ruleSettings, LevelCardScript level)
 {
     rulesForNextBoard = ruleSettings;
     nextLevelCard     = level;
 }