Example #1
0
        public void Fill(BeatMapMeta beatMapMeta)
        {
            string folderPath = Path.GetDirectoryName(beatMapMeta.Path);

            AudioPlayer.Instance.LoadAudio(Path.Combine(folderPath, beatMapMeta.SongFile));
            this.slider.maxValue = AudioPlayer.Instance.ClipLengthInSeconds;
        }
Example #2
0
        public static BeatMapMeta LoadBeatMap(string path)
        {
            string filePath = string.Equals(Path.GetExtension(path), ".rron")
                ? path
                : Directory.GetFiles(path, @"*.rron").First();
            BeatMapMeta prePath = RronConvert.DeserializeObjectFromFile <BeatMapMeta>(filePath);

            prePath.Path = path;
            return(prePath);
        }
Example #3
0
 private void Awake()
 {
     if (IsExistingBeatMap)
     {
         BeatMapMeta = FileLoader.LoadBeatMap(Path);
         this.gameObject.GetComponent <EditorConstructor>().Fill(BeatMapMeta);
     }
     else
     {
         this.editorHolder.SetActive(true);
     }
 }