//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    //	* Derived Method: On Disabled
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    protected void OnDisable()
    {
        if (sm_rCurrentlyActiveNotes == this)
        {
            sm_rCurrentlyActiveNotes = null;
        }

        SettingsMenuManager.UpdateMenuLabel();
    }
Ejemplo n.º 2
0
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //	* Derived Method: On Trigger
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 protected override void OnTrigger()
 {
     base.OnTrigger();
     if (GameManager.CurrentSubscene != null)
     {
         GameManager.CurrentSubscene.HideSubscene();
         ButtonManager.ToggleAllButtons(true);
     }
     else if (m_rNotesReveal != null)
     {
         m_rNotesReveal.Disappear(m_bOpenSettingsMenu);
         ButtonManager.ToggleAllButtons(true);
     }
     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();
    }