Ejemplo n.º 1
0
        public MakeBeatmap(Beatmap _bm, Hashtable _setup) : base(_bm, _setup)
        {
            random = new Random();

            try
            {
                string str = (string)_setup["SliderStyle"];
                str = str.Replace("\r", "");

                string[] styles = str.Split('\n');
                sliderTypes = new sliderStyle[styles.Length];

                for (int i = 0; i < styles.Length; i++)
                {
                    sliderTypes[i] = new sliderStyle(styles[i]);
                }
            }
            catch {
                Console.WriteLine("SliderStyle couldn't be parsed");

                var linearSlider = new sliderStyle("L,100:0,100");
                var curvedSlider = new sliderStyle("P,48:24|96:0,100");

                sliderTypes = new sliderStyle[] { linearSlider, curvedSlider };
            }


            try
            {
                string[] str = ((string)_setup["FlowLeniency"]).Split(',');

                flowLeniency = new int[5];
                for (int i = 0; i < 5; i++)
                {
                    flowLeniency[i] = int.Parse(str[i]);
                }
            }
            catch {
                Console.WriteLine("FlowLeniency couldn't be parsed");
                flowLeniency = new int[5] {
                    16, 33, 50, 63, 87
                };
            }

            try
            {
                string str = (string)_setup["DistanceSnap"];
                ds = double.Parse(str);
            }
            catch {
                Console.WriteLine("DS could not be parsed");
                ds = 1.3;
            }

            try
            {
                string str = (string)_setup["BpmDivisor"];
                beatDivisor = double.Parse(str);
            }
            catch {
                Console.WriteLine("BpmDivisor could not be parsed");
                beatDivisor = 0.25;
            }

            try
            {
                useDS = (bool)_setup["IsDistanceSnap"];
            }
            catch {
                useDS = false;
            }
        }
Ejemplo n.º 2
0
 public BeatmapGenerator(Beatmap _bm, Hashtable _setup)
 {
     bm    = _bm;
     setup = _setup;
 }