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);
            }
Beispiel #2
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();
        }