コード例 #1
0
 //Update the timeline and render the markers in the correct positions
 public void RenderTimeline()
 {
     if (_timeScale <= minThreshold && _mode == TimelineMode.sec)
     {
         _mode = TimelineMode.min;
         CreateTimeline(10);
     }
     else if (_timeScale >= minThreshold && _mode == TimelineMode.min)
     {
         _mode = TimelineMode.sec;
         CreateTimeline(1);
     }
     UpdateTimeline();
 }
コード例 #2
0
        //Load the song and wait for completion
        void Start()
        {
            //trackConfigWindow.CloseWindow();
            _dataPath = Application.dataPath + "/Songs";
            //if (GameRegistry.GetString("CUR_SONG") == null)
            //	GameRegistry.SetValue("CUR_SONG", "SongName");
            _mode = TimelineMode.sec;
            string curPath = _dataPath + "/" + GameRegistry.GetString("CUR_SONG", "SongName");

            _curSong = Song.loadSong(File.ReadAllBytes(curPath + "/Song.SongData"));
            Debug.Log(_curSong.songPath);
            //_curSong.songPath = "/SongName/Song.wav";
            //File.WriteAllBytes(_dataPath + "/SongName/Song.SongData", _curSong.getSongData());
            _audio             = GetComponent <AudioSource>();
            _audio.playOnAwake = false;
            _audio.Stop();
            EventManager.StartListening("songLoaded", SongReady);
            _loadStartTime = Time.time;
            StartCoroutine(_curSong.LoadAudioClip("songLoaded"));
            Debug.Log("Loading Song...");
        }
コード例 #3
0
ファイル: SongEditor.cs プロジェクト: TheDarkVoid/MikuSecret
        //Load the song and wait for completion
        void Start()
        {
            //trackConfigWindow.CloseWindow();
            _dataPath = Application.dataPath + "/Songs";
            _mode = TimelineMode.sec;
            _curSong = Song.loadSong(File.ReadAllBytes(_dataPath + "/SongName/Song.SongData"));

            //File.WriteAllBytes(_dataPath + "/SongName/Song.SongData", _curSong.getSongData());
            _audio = GetComponent<AudioSource>();
            _audio.playOnAwake = false;
            _audio.Stop();
            EventManager.StartListening("songLoaded", SongReady);
            _loadStartTime = Time.time;
            StartCoroutine(_curSong.LoadAudioClip("songLoaded"));
            Debug.Log("Loading Song...");
        }
コード例 #4
0
ファイル: SongEditor.cs プロジェクト: TheDarkVoid/MikuSecret
 //Update the timeline and render the markers in the correct positions
 public void RenderTimeline()
 {
     if (_timeScale <= minThreshold && _mode == TimelineMode.sec)
     {
         _mode = TimelineMode.min;
         CreateTimeline(10);
     }
     else if (_timeScale >= minThreshold && _mode == TimelineMode.min)
     {
         _mode = TimelineMode.sec;
         CreateTimeline(1);
     }
     UpdateTimeline();
 }