示例#1
0
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    //	* New Method: Start Challenge
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    public void StartChallenge()
    {
        ChallengeScore = 0.0f;
        VisibleScore   = 0.0f;
        m_lActiveChallengeNotes.Clear();
        m_eChallengeActivity = ChallengeActivity.CHALLENGE_MODE;

        foreach (Transform child in transform)
        {
            ChallengeNoteMovement cni = child.GetComponent <ChallengeNoteMovement>();
            cni.Reset();
            cni.BeginMovement();
            m_lActiveChallengeNotes.AddLast(cni);
        }

        StartNoteMovement();
        PlayBackingTrack(BackingTrackDelay);
    }
示例#2
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;
    }
示例#3
0
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    //	* New Method: Stop Challenge
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    public void StopChallenge()
    {
        StopNoteMovement();
        m_lActiveChallengeNotes.Clear();
        m_eChallengeActivity = ChallengeActivity.IDLE;
        foreach (Transform child in transform)
        {
            ChallengeNoteMovement cni = child.GetComponent <ChallengeNoteMovement>();
            cni.Reset();
        }

        StopBackingTrack();
#if UseMemoryGameManager
        if (m_rSoundsRhythmMemoryGame != null)
        {
            m_rSoundsRhythmMemoryGame.StopPlayback();
        }
#endif
    }
示例#4
0
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    //	* New Method: Start AutoPlay
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    public void StartAutoPlay()
    {
        if (IsPracticeMode)
        {
            ResetNotations();
            m_eChallengeActivity = ChallengeActivity.IDLE;
#if UseMemoryGameManager
            if (m_rSoundsRhythmMemoryGame != null)
            {
                m_rSoundsRhythmMemoryGame.StopPlayback();
            }
#endif
        }
        else
        {
            ChallengeScore       = 0.0f;
            VisibleScore         = 0.0f;
            m_eChallengeActivity = ChallengeActivity.PRACTICE_MODE;
            m_lActiveChallengeNotes.Clear();
            foreach (Transform child in transform)
            {
                ChallengeNoteMovement cni = child.GetComponent <ChallengeNoteMovement>();
                cni.Reset();
                cni.BeginAutoPlay();
                m_lActiveChallengeNotes.AddLast(cni);
            }

            StartNoteMovement();
            PlayBackingTrack(BackingTrackDelay);

            // Play Auto-Example
#if UseMemoryGameManager
            if (m_rSoundsRhythmMemoryGame != null)
            {
                m_rSoundsRhythmMemoryGame.PlayThroughRhythmList(m_ePlaylistTrack, null, StartDelayTime);
            }
#endif
        }
    }