Example #1
0
        public void TestTooShortSpinnerVaryingOd()
        {
            const double duration = 450;

            var difficultyLowOd = new BeatmapDifficulty {
                OverallDifficulty = 1
            };
            Spinner spinnerLowOd = new Spinner {
                StartTime = 0, Duration = duration
            };

            spinnerLowOd.ApplyDefaults(new ControlPointInfo(), difficultyLowOd);

            var difficultyHighOd = new BeatmapDifficulty {
                OverallDifficulty = 10
            };
            Spinner spinnerHighOd = new Spinner {
                StartTime = 0, Duration = duration
            };

            spinnerHighOd.ApplyDefaults(new ControlPointInfo(), difficultyHighOd);

            assertOk(new List <HitObject> {
                spinnerLowOd
            }, difficultyLowOd);
            assertTooShort(new List <HitObject> {
                spinnerHighOd
            }, difficultyHighOd);
        }
Example #2
0
        private Drawable testSingle(float circleSize, bool auto = false, double length = 3000)
        {
            const double delay = 2000;

            var spinner = new Spinner
            {
                StartTime = Time.Current + delay,
                EndTime   = Time.Current + delay + length,
                Samples   = new List <HitSampleInfo>
                {
                    new HitSampleInfo("hitnormal")
                }
            };

            spinner.ApplyDefaults(new ControlPointInfo(), new BeatmapDifficulty {
                CircleSize = circleSize
            });

            drawableSpinner = new TestDrawableSpinner(spinner, auto)
            {
                Anchor = Anchor.Centre,
                Depth  = depthIndex++,
                Scale  = new Vector2(0.75f)
            };

            foreach (var mod in SelectedMods.Value.OfType <IApplicableToDrawableHitObjects>())
            {
                mod.ApplyToDrawableHitObjects(new[] { drawableSpinner });
            }

            return(drawableSpinner);
        }
        public TestSceneSpinnerSelectionBlueprint()
        {
            var spinner = new Spinner
            {
                Position  = new Vector2(256, 256),
                StartTime = -1000,
                EndTime   = 2000
            };

            spinner.ApplyDefaults(new ControlPointInfo(), new BeatmapDifficulty {
                CircleSize = 2
            });

            DrawableSpinner drawableSpinner;

            Add(new Container
            {
                RelativeSizeAxes = Axes.Both,
                Size             = new Vector2(0.5f),
                Child            = drawableSpinner = new DrawableSpinner(spinner)
            });

            AddBlueprint(new SpinnerSelectionBlueprint(spinner)
            {
                Size = new Vector2(0.5f)
            }, drawableSpinner);
        }
Example #4
0
        public void TestTooShortSpinner()
        {
            Spinner spinner = new Spinner {
                StartTime = 0, Duration = 400
            };

            spinner.ApplyDefaults(new ControlPointInfo(), difficulty);

            assertTooShort(new List <HitObject> {
                spinner
            }, difficulty);
        }
Example #5
0
        public void TestVeryShortSpinner()
        {
            // Spinners at a certain duration only get 1000 points if approached by auto at a certain angle, making it difficult to determine.
            Spinner spinner = new Spinner {
                StartTime = 0, Duration = 475
            };

            spinner.ApplyDefaults(new ControlPointInfo(), difficulty);

            assertVeryShort(new List <HitObject> {
                spinner
            }, difficulty);
        }
Example #6
0
        private void testSingle(float circleSize, bool auto = false)
        {
            var spinner = new Spinner {
                StartTime = Time.Current + 1000, EndTime = Time.Current + 4000
            };

            spinner.ApplyDefaults(new ControlPointInfo(), new BeatmapDifficulty {
                CircleSize = circleSize
            });

            var drawable = new TestDrawableSpinner(spinner, auto)
            {
                Anchor = Anchor.Centre,
                Depth  = depthIndex++
            };

            foreach (var mod in Mods.OfType <IApplicableToDrawableHitObjects>())
            {
                mod.ApplyToDrawableHitObjects(new[] { drawable });
            }

            Add(drawable);
        }
Example #7
0
        private DrawableSpinner createSpinner()
        {
            var spinner = new Spinner
            {
                StartTime = Time.Current + 500,
                EndTime   = Time.Current + 2500
            };

            spinner.ApplyDefaults(new ControlPointInfo(), new BeatmapDifficulty());

            var drawableSpinner = new DrawableSpinner(spinner)
            {
                Anchor = Anchor.Centre
            };

            foreach (var mod in SelectedMods.Value.OfType <IApplicableToDrawableHitObjects>())
            {
                mod.ApplyToDrawableHitObjects(new[] { drawableSpinner });
            }

            Add(drawableSpinner);
            return(drawableSpinner);
        }
 private Spinner prepareObject(Spinner circle)
 {
     circle.ApplyDefaults(new ControlPointInfo(), new BeatmapDifficulty());
     return(circle);
 }