Exemple #1
0
 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);
 }
Exemple #2
0
 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();
 }
Exemple #3
0
        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);
        }
Exemple #4
0
 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();
 }
Exemple #5
0
 void LateUpdate()
 {
     BeatMapManager.StageLateUpdate();
 }
Exemple #6
0
 void FixedUpdate()
 {
     BeatMapManager.StageFixedUpdate();
     InputManager.StageFixedUpdate();
 }