Ejemplo n.º 1
0
        /// <summary>
        /// ヘッダ定義に関する行を処理する
        /// ここではBPMの数値定義を行い、実際のBPM変更は他のノーツと同様に処理する
        /// ヘッダ設定とは異なる行の場合はfalseを返す
        /// </summary>
        private static bool ReadHeaderLine(string readBuffer)
        {
            // 先頭が数字の場合はBPM設定ではない
            if (char.IsDigit(readBuffer[0]))
            {
                return(false);
            }

            string[] readBufferArray = readBuffer.Split(' ');

            // 譜面形式
            if (readBufferArray[0].Equals(OPERATION_PLAYER))
            {
                LoadMode = int.Parse(readBufferArray[1]);
            }
            // 初期BPM設定処理
            else if (readBufferArray[0].Equals(OPERATION_BPM))
            {
                int bpm = MusicTempoManager.GetBpmScaleValue(readBufferArray[1]);
                sheet.StartBpm = bpm;
            }
            // 拡張BPM設定処理
            else if (readBufferArray[0].StartsWith(OPERATION_BPM, StringComparison.CurrentCulture))
            {
                string bpmKey = readBufferArray[0].Substring(3, 2);
                sheet.AddBPMDefinition(bpmKey, readBufferArray[1]);
            }

            return(true);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// プレイ開始設定を行う
        /// </summary>
        public void StartMusicTimer(float timerOffset)
        {
            musicStartTime = Time.time + timerOffset;
            tempoManager   = MusicManager.Instance.GetCurrentTempoManager();
            tempoManager.StartMusic();

            isInitialized = true;
        }
Ejemplo n.º 3
0
 public MusicSheet(ulong id)
 {
     Id           = id;
     TempoManager = new MusicTempoManager();
 }