Beispiel #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);
            }
        }
    }
Beispiel #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;
            }
        }
    }
Beispiel #3
0
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //	* New Method: Refresh
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 public void Refresh()
 {
     UnityEngine.UI.Text rText = GetComponent <UnityEngine.UI.Text>();
     if (rText != null)
     {
         m_oMultiLanguageText.ApplyEffects(rText);
     }
 }
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    //	* New Method: Update Description Text Transition
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    private void UpdateDescriptionTextTransition()
    {
        if (m_bFadeinResults)
        {
            m_rFullGamePlugTextRenderer.gameObject.SetActive(true);
            m_oFullGamePlugTextDescription.ApplyEffects(m_rFullGamePlugTextRenderer);

            m_eTransitionPhase = TransitionPhase.SELECTABLE_BUTTONS;
            m_aSelectableButtons[0].gameObject.SetActive(true);
            m_aSelectableButtons[1].gameObject.SetActive(true);
        }
        else
        {
            m_rFullGamePlugTextRenderer.text = "";
            m_rFullGamePlugTextRenderer.gameObject.SetActive(false);
            m_eTransitionPhase = TransitionPhase.JOKOS_INSTRUMENTS_DISPLAY;
        }
    }
Beispiel #5
0
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    //	* Derived Method: On Enable
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    void OnEnable()
    {
        m_lActiveChallengeNotes.Clear();
        m_eChallengeActivity = ChallengeActivity.IDLE;
        m_rGameManager.SetCurrentInstrument(m_eInstrumentSoundType);

        if (m_rInstrumentSoundTypeRenderer != null)
        {
            m_rInstrumentSoundTypeRenderer.sprite = m_sprInstrumentSoundType;
        }

        if (m_rChallengeTitleText != null)
        {
            m_oChallengeName.ApplyEffects(m_rChallengeTitleText);
        }

        //if (m_rPracticeButton != null)
        //	m_rPracticeButton.m_ePlaylist = m_ePlaylistTrack;
    }
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    //	* New Method: Update Text Information
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    private IEnumerator UpdateTextInformation()
    {
        const float fTextDisplayTimer     = 3.0f;
        const float fTextFadeTime         = 0.5f;
        TimeTracker ttTextFadeTimer       = new TimeTracker(fTextFadeTime);
        bool        bShowingChallengeName = true;
        bool        bRequiresMoreFeathers = (m_eButtonAvailability == ButtonAvailability.NEED_MORE_FEATHERS);

        while (true)
        {
            // Show Text
            yield return(new WaitForSeconds(fTextDisplayTimer));

            // Fade out Text
            ttTextFadeTimer.Reset();
            while (!ttTextFadeTimer.TimeUp())
            {
                if (ttTextFadeTimer.Update())
                {
                    TextOpacity = 0.0f;
                    if (!bShowingChallengeName && bRequiresMoreFeathers)
                    {
                        FeatherOpacity = 0.0f;
                    }
                }
                else
                {
                    TextOpacity = Mathf.Lerp(m_cUnavailableTextColour.a, 0.0f, ttTextFadeTimer.GetCompletionPercentage());
                    if (!bShowingChallengeName && bRequiresMoreFeathers)
                    {
                        FeatherOpacity = (1.0f - ttTextFadeTimer.GetCompletionPercentage());
                    }
                }
                yield return(new WaitForEndOfFrame());
            }


            // Change Text
            bShowingChallengeName = !bShowingChallengeName;
            if (bShowingChallengeName)
            {
                if (bRequiresMoreFeathers)
                {
                    m_rRequiredFeathersIcon.gameObject.SetActive(false);
                }
                MultiLanguageTextComponent.ApplyEffects(TextRenderer);
            }
            else
            {
                if (bRequiresMoreFeathers)
                {
                    m_rRequiredFeathersIcon.gameObject.SetActive(true);
                    int iFeathers = m_rChallengeManager.GetRequiredFeathersAmountForChallenge(m_eChallengeID);
                    TextRenderer.text = " x" + (iFeathers < 10 ? "0" : "") + iFeathers.ToString();
                }
                else
                {
                    m_oUnavailableText.ApplyEffects(TextRenderer);
                }
            }
            TextOpacity = 0.0f;


            // Fade in Text
            ttTextFadeTimer.Reset();
            while (!ttTextFadeTimer.TimeUp())
            {
                if (ttTextFadeTimer.Update())
                {
                    TextOpacity = m_cUnavailableTextColour.a;
                    if (!bShowingChallengeName && bRequiresMoreFeathers)
                    {
                        FeatherOpacity = 1.0f;
                    }
                }
                else
                {
                    TextOpacity = Mathf.Lerp(0.0f, m_cUnavailableTextColour.a, ttTextFadeTimer.GetCompletionPercentage());
                    if (!bShowingChallengeName && bRequiresMoreFeathers)
                    {
                        FeatherOpacity = ttTextFadeTimer.GetCompletionPercentage();
                    }
                }
                yield return(new WaitForEndOfFrame());
            }
        }
    }