//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // * New Method: On NextChallenge Selected //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ private void OnNextChallengeSelected() { // Return to ChallengeSelection if just Passed FinalChallenge if (m_eCurrentChallengeID != SoundsRhythmMemoryGame.Playlist.CHALLENGE_25) { SoundsRhythmMemoryGame.Playlist eNextChallenge = (SoundsRhythmMemoryGame.Playlist)((int)m_eCurrentChallengeID + 1); if ((m_rChallengeGameManager.DoesChallengeRequireFullVersion(eNextChallenge) && !GameManager.IsFullVersion) || m_rChallengeGameManager.GetFeathersRemainingToUnlockChallenge(eNextChallenge) > 0) { m_rChallengeGameSelectionScene.ShowSubscene(); ButtonManager.ToggleAllButtons(ButtonManager.ButtonType.MENU, true); return; } else { m_rChallengeGameManager.CurrentChallengeID += 1; m_rChallengeGameManagerTransition.Reveal(false); ButtonManager.ToggleAllButtons(true); return; } } else { OnExitSelected(); } }
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // * New Method: Draw Inspector Options //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ protected override void DrawInspectorOptions() { Target.m_rTambourineSoundsManager = DrawObjectOption("Tambourine Sounds Manager Reference: ", Target.m_rTambourineSoundsManager); SoundsRhythmMemoryGame.Playlist eChoice = m_eCurrentPlaylist; eChoice = (SoundsRhythmMemoryGame.Playlist)Mathf.Clamp((int)((SoundsRhythmMemoryGame.Playlist)EditorGUILayout.EnumPopup(new GUIContent("Selected Playlist: ", "Which playlist will we be editing?"), eChoice)), 0, (int)SoundsRhythmMemoryGame.Playlist.TOTAL_PLAYLISTS - 1); if (Target.m_arTrackSoundInfo.Length != (int)SoundsRhythmMemoryGame.Playlist.TOTAL_PLAYLISTS) { ResizeArray(ref Target.m_arTrackSoundInfo, (int)SoundsRhythmMemoryGame.Playlist.TOTAL_PLAYLISTS); } if (eChoice != m_eCurrentPlaylist) { m_eCurrentPlaylist = eChoice; } }
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // * New Method: Begin Fadein //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ public void BeginFadein(SoundsRhythmMemoryGame.Playlist a_eChallengeID, int a_iScore, UnlockedItems a_eUnlockedItems) { m_eCurrentChallengeID = a_eChallengeID; m_eUnlockedItem = a_eUnlockedItems; int iAccFeathers = ChallengeFeathersInfo.PreviouslyAccumulatedFeathers; m_rChallengeFeatherNotificationText.text = "x" + (iAccFeathers < 10 ? "0" :"") + iAccFeathers.ToString(); // Stop Coroutine if active! if (m_ShowAwardedFeathersCoroutine != null) { StopCoroutine(m_ShowAwardedFeathersCoroutine); } // Joko's Reaction Settings ChallengeGameScoreManager.ScoreResult eScoreResult = ChallengeGameScoreManager.GetScoreResult(a_iScore); m_eReactionMode = (eScoreResult == ChallengeGameScoreManager.ScoreResult.GREAT) ? ReactionMode.GREAT : (eScoreResult == ChallengeGameScoreManager.ScoreResult.GOOD) ? ReactionMode.GOOD : (eScoreResult == ChallengeGameScoreManager.ScoreResult.OKAY) ? ReactionMode.OKAY : ReactionMode.DEFEATED; // EXP Bar Settings m_fAcquiredScore = ((float)a_iScore / 100); m_imgExperienceBar.fillMethod = (a_iScore > 99 ? UnityEngine.UI.Image.FillMethod.Radial180 : UnityEngine.UI.Image.FillMethod.Horizontal); m_sprJokosReaction.sprite = m_arReactions[(int)m_eReactionMode].reactionImage; // Feather Options m_aSprFeathers[0].sprite = (eScoreResult != ChallengeGameScoreManager.ScoreResult.TERRIBLE ? m_sprEnabledFeatherSprite : m_sprDisabledFeatherSprite); m_aSprFeathers[1].sprite = ((eScoreResult == ChallengeGameScoreManager.ScoreResult.GOOD || eScoreResult == ChallengeGameScoreManager.ScoreResult.GREAT) ? m_sprEnabledFeatherSprite : m_sprDisabledFeatherSprite); m_aSprFeathers[2].sprite = (eScoreResult == ChallengeGameScoreManager.ScoreResult.GREAT ? m_sprEnabledFeatherSprite : m_sprDisabledFeatherSprite); // Toggle animation and disable user input for now ShowFirstAnimationFrames(); m_eTransitionPhase = TransitionPhase.CHALLENGE_MODE; m_bFadeinResults = true; ButtonManager.ToggleAllButtons(false); }
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // * New Method: How Many Feathers Remaining are Required To Unlock Challenge? //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ public int GetFeathersRemainingToUnlockChallenge(SoundsRhythmMemoryGame.Playlist eChallengeID) { return(m_arChallenges[(int)eChallengeID].RemainingRequiredFeathers); }
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // * New Method: Get Required Feathers To Unlock Challenge //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ public int GetRequiredFeathersAmountForChallenge(SoundsRhythmMemoryGame.Playlist eChallengeID) { return(m_arChallenges[(int)eChallengeID].RequiredFeathers); }
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // * New Method: Does Challenge Require Full Version? //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ public bool DoesChallengeRequireFullVersion(SoundsRhythmMemoryGame.Playlist eChallengeID) { return(m_arChallenges[(int)eChallengeID].RequiresFullVersion); }