//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    //	* New Method: On Revealed
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    protected virtual void OnRevealed()
    {
        // Once revealed, this note is active
        m_bOpened = true;
        if (m_bAssignToSettingsButton)
        {
            sm_rCurrentlyActiveNotes = this;
        }

        // Enable the Notes Movement Script and Exit Button if they exist
        m_eCurrentState = CurrentState.IDLE;
        if (m_rNotesMovement != null)
        {
            // Stop Player Input for anything besides the menu
            ButtonManager.ToggleAllButtonsExcept(ButtonManager.ButtonType.MENU, false);
            m_rNotesMovement.enabled = true;
        }

        // Assign Self to the exit buttons. If clicked, the exit button instance will call the 'disappear' function.
        if (!TutorialManager_Base.TutorialOpened)
        {
            for (int i = 0; i < m_arExitButtons.Length; ++i)
            {
                if (m_arExitButtons[i] != null)
                {
                    m_arExitButtons[i].gameObject.SetActive(true);
                    m_arExitButtons[i].enabled        = true;
                    m_arExitButtons[i].m_rNotesReveal = this;
                }
            }
        }
    }
Пример #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);
            }
        }
    }
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    //	* Derived Method: On Disabled
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    protected void OnDisable()
    {
        if (sm_rCurrentlyActiveNotes == this)
        {
            sm_rCurrentlyActiveNotes = null;
        }

        SettingsMenuManager.UpdateMenuLabel();
    }
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    //	* New Method: On Disappeared
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    protected virtual void OnDisappeared()
    {
        // Once Disappeared, this note is no longer active
        m_bOpened = false;
        if (m_bAssignToSettingsButton && sm_rCurrentlyActiveNotes == this)
        {
            sm_rCurrentlyActiveNotes = null;
        }

        this.enabled = false;
        this.gameObject.SetActive(false);

        // Reactivate Player Input
        ButtonManager.ToggleAllButtons(true);
        TambourineShakeDetector.CheckForShake = true;

        // If we came from the Settings Menu, make it open up once again
        if (m_bShowSettingsMenuOnClose && SettingsMenuManager.Available)
        {
            SettingsMenuManager.Open();
        }
        SettingsMenuManager.UpdateMenuLabel();
    }
 public void BeginFadein(ObjectTransitionAnimation previousNote)
 {
     BeginFadein(null, previousNote);
 }
Пример #7
0
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //	* New Method: Set Current Scene Object
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 public void SetCurrentSceneObject(ObjectTransitionAnimation sceneObject)
 {
     m_rCurrentSceneObject = sceneObject;
 }