Example #1
0
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //	* New Method: Save Preference
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 protected void SavePreference()
 {
     if (m_bSavePreference)
     {
         SavedPreferenceTool.SaveInt(m_sSavedKeyPreference, SelectedIndex);
     }
 }
Example #2
0
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    //	* New Method: On Challenge Finish
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    private void OnChallengeFinish()
    {
        // Show Results?
        bool bShowResults = m_eChallengeActivity == ChallengeActivity.CHALLENGE_MODE;

        // Was Challenge Mode? Then we can update the feathers as needed
        if (bShowResults && !TutorialManager_Base.TutorialOpened)
        {
            ChallengeGameScoreManager.ScoreResult eScoreResult = ChallengeGameScoreManager.GetScoreResult(Mathf.CeilToInt(sm_fScore * 100.0f));
            int iChallengeScore = (eScoreResult == ChallengeGameScoreManager.ScoreResult.TERRIBLE)        ? 0 :
                                  (eScoreResult == ChallengeGameScoreManager.ScoreResult.OKAY)            ? 1 :
                                  (eScoreResult == ChallengeGameScoreManager.ScoreResult.GOOD)            ? 2 : 3;
            int iCompletionCount = SavedPreferenceTool.GetInt(m_ePlaylistTrack.ToString() + "_FeatherCount", 0);
            if (iChallengeScore > iCompletionCount)
            {
                ChallengeFeathersInfo.NewlyObtainedFeathers = (iChallengeScore - iCompletionCount);
                SavedPreferenceTool.SaveInt(m_ePlaylistTrack.ToString() + "_FeatherCount", iChallengeScore);    // Save to the Challenge itself, now you'll see these feathers light up when in the challenge select!
                ChallengeFeathersInfo.AccumulatedFeathers += ChallengeFeathersInfo.NewlyObtainedFeathers;       // Add to the total accumulated Feathers
            }
            else
            {
                ChallengeFeathersInfo.NewlyObtainedFeathers = 0;
            }
        }

        // Stop Active Challenge!
        m_rGameManager.StopChallenge(bShowResults);
        StopBackingTrack();
    }
Example #3
0
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    //	* New Method: Set Instrument Mode
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    private void SetInstrumentMode(InstrumentMode eMode)
    {
        if (m_eCurrentInstrumentMode != eMode)
        {
            // Disable Currently Active Instrument
            DisableInstrument(m_eCurrentInstrumentMode);
            bool bActivateTargets = m_arTambourineTargets[(int)m_eCurrentInstrumentMode].Visible;

            // Make the switch, saving to memory so that the app uses this same instrument next time app is loaded
            m_eCurrentInstrumentMode = eMode;
            SavedPreferenceTool.SaveInt("InstrumentMode", (int)eMode);

            // Activate next instrument and put it into the normal display state
            ActivateInstrument(eMode);
            ShowNormalInstrumentState();
            if (bActivateTargets)
            {
                m_arTambourineTargets[(int)eMode].ShowTargets();
            }
            else
            {
                m_arTambourineTargets[(int)eMode].HideTargets();
            }
        }
    }
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    //	* New Method: Activate Game
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    private void ActivateGame()
    {
        SavedPreferenceTool.SaveInt("SeenTitleIntroSequence", 1);
        ButtonManager.ToggleAllButtons(true);

        if (m_agoGameActivationObjectsToEnable != null && m_agoGameActivationObjectsToEnable.Length > 0)
        {
            foreach (GameObject Obj in m_agoGameActivationObjectsToEnable)
            {
                if (Obj != null)
                {
                    Obj.SetActive(true);
                }
            }
        }
        ProceedToNextPhase();
    }