Esempio n. 1
0
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    //	* Derived Method: On Trigger
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    protected override void OnTrigger()
    {
        base.OnTrigger();
        m_oMenuLabelDisplay.ApplyEffects(m_rMenuTextLabel);
        if (GameManager.CurrentSubscene != null)
        {
            GameManager.CurrentSubscene.HideSubscene();
        }
        else if (ObjectTransitionAnimation.CurrentlyActive != null && !ObjectTransitionAnimation.CurrentlyActive.IsLocked)
        {
            ObjectTransitionAnimation.CurrentlyActive.Disappear();
        }
        else
        {
            if (SettingsMenuManager.Opened)
            {
                ShowUnpressedSprite();
                SettingsMenuManager.Close();
            }
            else
            {
                ShowPressedSprite();
                SettingsMenuManager.Open();

                m_oExitLabelDisplay.ApplyEffects(m_rMenuTextLabel);
            }
        }
    }
    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 Trigger
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    protected override void OnTrigger()
    {
        base.OnTrigger();

        if (m_rTutorialManager != null)
        {
            SettingsMenuManager.Close();
            m_rTutorialManager.BeginTutorial(m_iTutorialStartPointID);
        }
    }
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    //	* Derived Method: On Trigger
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    protected override void OnTrigger()
    {
        base.OnTrigger();

        if (m_rInstrumentManager.CurrentInstrumentMode != m_eSelectedInstrument)
        {
            m_rInstrumentManager.CurrentInstrumentMode = m_eSelectedInstrument;
            if (!TutorialManager_Base.TutorialOpened)
            {
                SettingsMenuManager.Close();
            }
        }
    }
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    //	* New Method: Reveal
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /// <summary>
    /// Forces the object to appear using a predefined animation.
    /// </summary>
    /// <param name="a_bCloseSettingsMenuFirst">Close Settings Menu (if opened) before proceeding?</param>
    /// <param name="a_bAssignSelfToSettings">Assign Self To Settings Menu? Doing so will cause the settings button to call this script's 'Disappear' Method when pressed.</param>
    /// <param name="a_bReverseDisappearAnimation">Play the Disappear Animation in reverse?</param>
    public virtual void Reveal(bool a_bCloseSettingsMenuFirst = true, bool a_bAssignSelfToSettings = true, bool a_bReverseDisappearAnimation = false)
    {
        if (IsLocked)
        {
            return;
        }



        // Close the Settings Menu if Opened
        m_bAssignToSettingsButton = a_bAssignSelfToSettings;
        m_bWaitForSettingsMenu    = a_bCloseSettingsMenuFirst;
        if (m_bWaitForSettingsMenu && SettingsMenuManager.Opened)
        {
            SettingsMenuManager.Close();
        }
        if (m_bAssignToSettingsButton)
        {
            // Assign self to SubScene if active
            if (GameManager.CurrentSubscene != null)
            {
                GameManager.CurrentSubscene.SetCurrentSceneObject(this);
            }

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


        // Setup Reveal variables and make this gameobject active in the Scene
        if (a_bReverseDisappearAnimation)
        {
            m_iCurrentAnimationElement = m_aDisappearAnimationEffect.Length - 1;
            m_eCurrentState            = CurrentState.REVERSE_DISAPPEARING;
            m_aDisappearAnimationEffect[m_iCurrentAnimationElement].Reset();
        }
        else
        {
            m_iCurrentAnimationElement = 0;
            m_eCurrentState            = CurrentState.REVEAL;
            m_aRevealAnimationEffect[m_iCurrentAnimationElement].Reset();
        }
        this.enabled = true;
        this.gameObject.SetActive(true);
    }
Esempio n. 6
0
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //	* Derived Method: On Trigger
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 protected override void OnTrigger()
 {
     base.OnTrigger();
     SettingsMenuManager.Close();
 }