private IEnumerator LoadLevelFail(string msg) { HoldOn.Hide(); Debug.LogError(msg); StopAllCoroutines(); Loading = false; GamePlaying = false; StageMusic.Main.Clear(); BeatMapManager.ClearBeatMap(); Resources.UnloadUnusedAssets(); yield return(null); }
void Awake() { Main = this; TheStageSetting.UserName = ObscuredPrefs.GetString("UserName", ""); TheStageSetting.SpeedScale = PlayerPrefs.GetInt("SpeedScale", 4); InitAimTransform(); for (int i = 0; i < 6; i++) { Main.StringAimPos[i] = TheStageSetting.StringTFs[i].position; } TheStageSetting.AutoPlay = true; StageScore.Close(); StageMusic.StopToEndCallback += this.OnMusicEnd; BeatMapManager.StageAwake(); InputManager.StageAwake(); }
private IEnumerator LoadBeatMap(string path) { // Check if (!File.Exists(path)) { yield return(LoadLevelFail("BeatMapFile Path is NOT exists! " + path)); } // Load BeatMapManager.ClearBeatMap(); bool success = BeatMapManager.LoadBeatMap(path); if (!success) { yield return(LoadLevelFail("Failed to load beatMap! " + path)); } StageScore.Open(BeatMapManager.GetNoteSum()); yield return(null); }
public static void StopGame() { if (Loading || !Main) { return; } StageMusic.Main.Clear(); StageMicrophone.MicrophoneStop(); BeatMapManager.ClearBeatMap(); GamePlaying = false; TheStageSetting.TitleBGM.UnPause(); TheStageSetting.AutoPlayTagOn = TheStageSetting.AutoPlay; TheStageSetting.ResultScore = 0; TheStageSetting.ResultPerfect = StageScore.PerfectNum; TheStageSetting.ResultGood = StageScore.GoodNum; TheStageSetting.ResultMiss = StageScore.MissNum; TheStageSetting.ResultMaxCombo = StageScore.MaxCombo; InitAimTransform(); RemoveAllNotes(); TheStageSetting.AutoPlay = true; StageScore.Close(); }
void LateUpdate() { BeatMapManager.StageLateUpdate(); }
void FixedUpdate() { BeatMapManager.StageFixedUpdate(); InputManager.StageFixedUpdate(); }