예제 #1
0
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //	* New Method: On NextChallenge Selected
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 private void OnNextChallengeSelected()
 {
     // Return to ChallengeSelection if just Passed FinalChallenge
     if (m_eCurrentChallengeID != SoundsRhythmMemoryGame.Playlist.CHALLENGE_25)
     {
         SoundsRhythmMemoryGame.Playlist eNextChallenge = (SoundsRhythmMemoryGame.Playlist)((int)m_eCurrentChallengeID + 1);
         if ((m_rChallengeGameManager.DoesChallengeRequireFullVersion(eNextChallenge) && !GameManager.IsFullVersion) || m_rChallengeGameManager.GetFeathersRemainingToUnlockChallenge(eNextChallenge) > 0)
         {
             m_rChallengeGameSelectionScene.ShowSubscene();
             ButtonManager.ToggleAllButtons(ButtonManager.ButtonType.MENU, true);
             return;
         }
         else
         {
             m_rChallengeGameManager.CurrentChallengeID += 1;
             m_rChallengeGameManagerTransition.Reveal(false);
             ButtonManager.ToggleAllButtons(true);
             return;
         }
     }
     else
     {
         OnExitSelected();
     }
 }
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    //	* New Method: On Fadeout
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    private void OnFadeout()
    {
        m_eTransitionPhase = TransitionPhase.IDLE;
        ButtonManager.ToggleAllButtons(true);

        if (m_eExitSelection == ExitSelection.EXIT)
        {
            // Do Something when "Maybe Later" (Do not purchase full game) is clicked?
            if (m_rPreviousScene != null)
            {
                if (m_rPreviousScene.IsSceneActive)
                {
                    m_rPreviousScene.ShowSceneVignette();
                }
                else
                {
                    m_rPreviousScene.ShowSubscene();
                }
            }
            else
            {
                VignetteManager.TransitionVignette(0.0f, 0.25f);
            }

            if (m_rPreviousNotePage != null)
            {
                m_rPreviousNotePage.Reveal();
            }
        }
        else
        {
            // Open URL Confirmation Window (Purchase Full Game)
            m_rOpenURLConfirmationWindow.OpenConfirmationWindow(Button_OpenURL.URLType.APPLE_OR_ANDROID, m_asFullGameAndroidURL[(int)GameManager.DisplayableLanguages], m_asFullGameAppleURL[(int)GameManager.DisplayableLanguages], m_oURLConfirmationDescription, m_rPreviousScene, m_rPreviousNotePage);
        }
    }
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    //	* Derived Callback Method: On Tutorial Complete
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    public override void OnTutorialComplete()
    {
        base.OnTutorialComplete();

        // Make SubScene Active again!
        m_rGuideBookScene.ShowSubscene();
    }
예제 #4
0
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    //	* Derived Method: On Trigger
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    protected override void OnTrigger()
    {
        base.OnTrigger();

        // Run Parental GATE on Android/iOS Devices!
#if !UNITY_EDITOR && UNITY_IOS
        Floop.FloopManager.Instance.ShowParentalGate((success) =>
        {
            if (success)
            {
#endif
        // If URL is to be used for both devices, use it:
        if (m_eType == URLType.APPLE_AND_ANDROID)
        {
            if (URL != "")
            {
                Application.OpenURL(URL);
            }
        }

        // Otherwise open the appropriate URL
        else
        {
#if UNITY_ANDROID
            if (androidURL != "")
            {
                Application.OpenURL(androidURL);
            }
#else
            if (URL != "")
            {
                Application.OpenURL(URL);
            }
#endif
        }
#if !UNITY_EDITOR && UNITY_IOS
    }

    else
    {
    }
});
#endif



        if (m_rOwningPage != null)
        {
            m_rOwningPage.Disappear(false);
        }

        // Show Previous Scene/Note
        if (m_rPreviousScene != null)
        {
            if (m_rPreviousScene.IsSceneActive)
            {
                m_rPreviousScene.ShowSceneVignette();
            }
            else
            {
                m_rPreviousScene.ShowSubscene();
            }
        }
        if (m_rPreviousNotePage != null)
        {
            m_rPreviousNotePage.Reveal(false);
        }

        // Hide vignette since no one will take ownership~!
        if (m_rPreviousScene == null)
        {
            VignetteManager.TransitionVignette(0.0f, 0.25f);
        }
    }