Inheritance: MonoBehaviour
Esempio n. 1
0
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    //	* New Method: Fadeout Tutorial
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    protected IEnumerator FadeoutTutorial()
    {
        // Fade out Tutorial BGM
        AudioSourceManager.FadeoutAudio(m_oAudioHandlerInfo);

        // Disappear/Fadeout Tutorial TextBox
        m_rTextBoxTransitionEffect.UnlockNoteObject();
        m_rTextBoxTransitionEffect.Disappear(false);
        while (m_rTextBoxTransitionEffect.IsCurrentlyActive)
        {
            yield return(new WaitForEndOfFrame());
        }

        // Fadeout Vignette. Only if nothing else is already Transitioning it~
        if (!VignetteManager.IsTransitioning)
        {
            if (VignetteManager.CurrentColour.a > 0.05f)
            {
                float transitionTime = 0.5f;
                VignetteManager.TransitionVignette(0.0f, transitionTime);
                while (VignetteManager.IsTransitioning)
                {
                    yield return(new WaitForEndOfFrame());
                }
            }
        }

        this.gameObject.SetActive(false);
    }
Esempio n. 2
0
    public void OpenConfirmationWindow(URLType eURLType, string androidURLWeblink, string appleURLWeblink, MultiLanguageText confirmationDescription, SubSceneManager previousScene = null, ObjectTransitionAnimation previousNotePage = null)
    {
        if (m_rConfirmationWindowDisplay != null)
        {
            // Hide whatever notes are currently active (if applicable)
            if (ObjectTransitionAnimation.CurrentlyActive != null)
            {
                ObjectTransitionAnimation.CurrentlyActive.Disappear(false);
            }

            // Reveal Confirmation Window & Show URL Confirmation Description
            m_rConfirmationWindowDisplay.Reveal();
            if (m_rTextDisplay != null && confirmationDescription != null)
            {
                confirmationDescription.ApplyEffects(m_rTextDisplay);
            }

            // Show Background Vignette
            VignetteManager.TransitionVignette(m_oVignetteInfo);

            // Assign URL variables as provided.
            m_eType = eURLType;
            androidURL = androidURLWeblink;
            URL = appleURLWeblink;

            m_rPreviousScene = previousScene;
            m_rPreviousNotePage = previousNotePage;

            if (m_rDoNotOpenURLButton != null)
            {
                m_rDoNotOpenURLButton.PreviousScene = previousScene;
                m_rDoNotOpenURLButton.PreviousNotePage = previousNotePage;
            }
        }
    }
    public void BeginFadein(SubSceneManager previousScene, ObjectTransitionAnimation previousNote)
    {
        m_rPreviousScene    = previousScene;
        m_rPreviousNotePage = previousNote;
        if (!SupressPlugWindow)
        {
            // Show Vignette
            VignetteManager.TransitionVignette(m_oVignetteInfo);

            if (SettingsMenuManager.Opened)
            {
                SettingsMenuManager.Close();
            }

            // Toggle animation and disable user input for now
            ShowFirstAnimationFrames();
            m_eTransitionPhase = TransitionPhase.SETTINGS_MENU;
            m_bFadeinResults   = true;
            ButtonManager.ToggleAllButtons(false);
        }
        else
        {
            if (previousNote != null)
            {
                previousNote.Reveal(false);
            }
        }
    }
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    //	* 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 Method: On Trigger
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    protected override void OnTrigger()
    {
        base.OnTrigger();

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

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

        // Hide Vignette if no one is going to own it :/
        if (PreviousScene == null)
        {
            VignetteManager.TransitionVignette(0.0f, 0.25f);
        }
    }
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    //	* Unity Callback Method: Start
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    protected override void Start()
    {
        base.Start();

        // If MainInstrument Tutorial Completed... Turn it off and hide the fact it was ever turned on to begin with (>_<)
        if (HasCompletedTutorial)
        {
            StopAllCoroutines();
            ExitTutorial();
            VignetteManager.TransitionVignette(0.0f, 0.5f);
        }
    }
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    //	* New Method: Open
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    public static void Open()
    {
        // Don't open if already opened... OBVIOUS!
        if (!Opened)
        {
            sm_rInstance.m_tAnimationTarget.gameObject.SetActive(true);
            sm_rInstance.m_eTransitionPhase = TransitionPhase.OPEN;

            if (sm_rInstance.m_rgoJokosBagGlowEffect != null)
            {
                sm_rInstance.m_rgoJokosBagGlowEffect.SetActive(false);
            }

            if (!TutorialManager_Base.TutorialOpened)
            {
                VignetteManager.TransitionVignette(0.0f, 0.3f);
            }
        }
    }
Esempio n. 8
0
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    //	* New Method: Hide Subscene
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    public void HideSubscene()
    {
        AudioSourceManager.FadeoutAudio(m_oSubsceneAudioHandler);

        if (!TutorialManager_Base.TutorialOpened)
        {
            VignetteManager.TransitionVignette(0.0f, m_oVignetteInfo.transitionTime, m_oVignetteInfo.orderInLayer);
        }

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

        IsSceneActive = false;
        if (GameManager.CurrentSubscene == this)
        {
            GameManager.CurrentSubscene = null;
        }
    }
Esempio n. 9
0
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //	* New Method: Update Results Page Transition
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 private void UpdateResultsPageTransition()
 {
     if (m_bFadeinResults)
     {
         if (m_rPageBackgroundAE.UpdateAnimation(m_fRevealAnimationSpeed))
         {
             m_rPageBackgroundAE.Reset();
             m_eTransitionPhase = TransitionPhase.JOKOS_REACTION;
             m_sprJokosReaction.gameObject.SetActive(true);
         }
     }
     else
     {
         if (m_rPageBackgroundAE.ReverseUpdate(m_fDisappearAnimationSpeed))
         {
             m_rPageBackgroundAE.Reset();
             m_eTransitionPhase = TransitionPhase.RESULTS_BG;
             VignetteManager.TransitionVignette(0.0f, m_oVignetteOptions.transitionTime);
             m_sprPageBackground.gameObject.SetActive(false);
         }
     }
 }
Esempio n. 10
0
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    //	* New Method: Fadein Tutorial
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    protected IEnumerator FadeinTutorial()
    {
        // Fade in Tutorial BGM
        AudioSourceManager.PlayAudioClip(m_oAudioHandlerInfo);

        // Fade in Vignette First
        VignetteManager.TransitionVignette(CurrentVignetteInfo);
        while (VignetteManager.IsTransitioning)
        {
            yield return(new WaitForEndOfFrame());
        }

        // Now You can Fadein/Show the Tutorial TextBox
        m_rTextBoxTransitionEffect.Reveal(false, false);
        m_rTextBoxTransitionEffect.LockNoteObject();
        while (!m_rTextBoxTransitionEffect.IsCurrentlyActive)
        {
            yield return(new WaitForEndOfFrame());
        }

        ResetTutorial();
        OnTutorialFadeinComplete();
    }
Esempio n. 11
0
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    //	* New Method: Update Settings Menu Transition
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    private void UpdateSettingsMenuTransition()
    {
        if (m_bFadeinResults)
        {
            if (m_rSettingsMenuAE.UpdateAnimation(m_fRevealAnimationSpeed))
            {
                m_rSettingsMenuAE.Reset();
                m_eTransitionPhase = TransitionPhase.RESULTS_BG;
                VignetteManager.TransitionVignette(m_oVignetteOptions);

                m_rSettingsMenu.GetComponent <Button_ForceSceneObjectDisappear>().enabled = false;                // There's nothing to disable/disappear, Buddy!
                m_rSettingsMenu.gameObject.SetActive(false);
            }
        }
        else
        {
            if (m_rSettingsMenuAE.ReverseUpdate(m_fDisappearAnimationSpeed))
            {
                m_rSettingsMenuAE.Reset();
                OnFadeout();
            }
        }
    }
Esempio n. 12
0
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    //	* New Method: Activate Default Showing Tutorial Text State
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    protected virtual void ActivateDefaultShowingTutorialTextState()
    {
        DisableTutorialButtons();

        m_rTextBoxCollider.enabled = true;
        m_rTutorialContinueButton.gameObject.SetActive(false);
        m_rTutorialContinueButton.m_rTutorialManager = this;

        // Apply Human-Language Specific text (including fontSize, position, etc) to the Text Component. Then use that info to store TutorialTextLines
        if (CurrentTutorialText.SelectedText != "")
        {
            CurrentTutorialText.ApplyEffects(m_rTutorialTextComponent);
            m_rTextAnimationEffect.SetText(m_rTutorialTextComponent.text);
            m_rTutorialTextComponent.text = "";

            // Also make the Vignette visible if available
            VignetteManager.TransitionVignette(CurrentVignetteInfo);
        }
        // Move on to next tutorial area if there is no text to display
        else
        {
            ChangeTutorialState(TutorialState.WAITING_FOR_TUTORIAL_INPUT);
        }
    }
Esempio n. 13
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);
        }
    }
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //	* Derived Method: Awake
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 void Awake()
 {
     sm_rSelfInstance = this;
 }
Esempio n. 15
0
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //	* New Method: Show Scene Vignette
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 public void ShowSceneVignette()
 {
     VignetteManager.TransitionVignette(m_oVignetteInfo);
 }
 void Awake()
 {
     vignette = GetComponent< VignetteManager>();
 }