예제 #1
0
 private void StartNewMap(int songOffset, float bpm, string fullPathToAudio,
                          string songArtist, string mapArtist, string songName, BeatSaveDifficulty difficulty,
                          string songFileName)
 {
     Debug.LogWarning("Selectednewsong - " + songFileName);
     SetCurrentState(EditorState.StartNewMapLoad);
     BeatMap.currentDifficulty = difficulty;
     beatMapData = BeatMapData.GenerateBMDInfo(mapArtist, songArtist, songName
                                               , songOffset, bpm, difficulty, songFileName);
     song           = Utilities.StartAudioInitialize(fullPathToAudio);
     audioIsLoading = true;
 }
예제 #2
0
            public static DifficultyLevel Generate(BeatSaveDifficulty difficulty, string audioFileName
                                                   , int offset)
            {
                DifficultyLevel level = new DifficultyLevel();

                level.difficulty     = difficulty.ToString();
                level.difficultyRank = 4;//Expert
                level.audioPath      = audioFileName;
                level.jsonPath       = difficulty.ToString() + ".json";
                level.offset         = offset;
                return(level);
            }
예제 #3
0
        public static BeatMapData GenerateBMDInfo(string mapArtist, string songArtist, string songName,
                                                  int songOffset, float bpm, BeatSaveDifficulty difficulty, string songFileName)
        {
            BeatMapData data = new BeatMapData();

            data.mapArtist      = mapArtist;
            data.songArtist     = songArtist;
            data.songFileName   = songFileName;
            data.songName       = songName;
            data.songOffset     = songOffset;
            data.beatsPerMinute = bpm;
            data.difficulty     = difficulty;
            return(data);
        }
예제 #4
0
 public void OnNewValuesChanged()
 {
     selectedMode           = (BeatMap.NoteMode)noteModeDropDown.value;
     selectedAudioPath      = audioPathTextBox.text;
     selecedNewSongFileName = Path.GetFileName(selectedAudioPath);
     try
     {
         selectedBPM = float.Parse(bpmTextBox.text);
     }
     catch (FormatException e) { }
     selectedNewSongName = newSongNameTextBox.text;
     selectedMapArtist   = mapArtistTextBox.text;
     selectedSongArtist  = songArtistTextBox.text;
     selectedDifficulty  = (BeatSaveDifficulty)newDifficultyDropdown.value;
 }
예제 #5
0
        // Use this for initialization
        void Start()
        {
            directories = Directory.GetDirectories(BeatMap.savePath);
            List <Dropdown.OptionData> options = new List <Dropdown.OptionData>();

            foreach (string directory in directories)
            {
                Dropdown.OptionData option = new Dropdown.OptionData();
                option.text = directory.Substring(BeatMap.savePath.Length);
                options.Add(option);
            }
            dirDropDown.AddOptions(options);
            List <string> noteModeOptionStrings = new List <string>();

            noteModeOptionStrings.Add("Whole Note");
            noteModeOptionStrings.Add("Half Note");
            noteModeOptionStrings.Add("Quarter Note");
            noteModeOptionStrings.Add("Eighth Note");
            noteModeOptionStrings.Add("Double Note");
            noteModeDropDown.ClearOptions();
            List <Dropdown.OptionData> noteModeOptions = new List <Dropdown.OptionData>();

            foreach (string mode in noteModeOptionStrings)
            {
                Dropdown.OptionData option = new Dropdown.OptionData();
                option.text = mode;
                noteModeOptions.Add(option);
            }
            noteModeDropDown.AddOptions(noteModeOptions);
            List <Dropdown.OptionData> newDifficultyOptions = new List <Dropdown.OptionData>();

            for (int count = 0; count < Enum.GetNames(typeof(BeatSaveDifficulty)).Length; count++)
            {
                BeatSaveDifficulty  currentDiff = (BeatSaveDifficulty)count;
                Dropdown.OptionData option      = new Dropdown.OptionData(currentDiff.ToString());
                newDifficultyOptions.Add(option);
            }
            newDifficultyDropdown.ClearOptions();
            newDifficultyDropdown.AddOptions(newDifficultyOptions);
            OnDirValueChange();
            OnNewValuesChanged();
        }