Use ApplyDefaults in TestSceneFruitObjects.

This commit is contained in:
ekrctb 2020-11-30 12:58:14 +09:00
parent 5d3a5081a0
commit 7986d7802d

View File

@ -3,6 +3,8 @@
using NUnit.Framework; using NUnit.Framework;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Game.Beatmaps;
using osu.Game.Beatmaps.ControlPoints;
using osu.Game.Rulesets.Catch.Objects; using osu.Game.Rulesets.Catch.Objects;
using osu.Game.Rulesets.Catch.Objects.Drawables; using osu.Game.Rulesets.Catch.Objects.Drawables;
using osuTK; using osuTK;
@ -55,9 +57,9 @@ namespace osu.Game.Rulesets.Catch.Tests
protected virtual DrawableCatchHitObject SetProperties(DrawableCatchHitObject d) protected virtual DrawableCatchHitObject SetProperties(DrawableCatchHitObject d)
{ {
var hitObject = d.HitObject; var hitObject = d.HitObject;
hitObject.ApplyDefaults(new ControlPointInfo(), new BeatmapDifficulty { CircleSize = 0 });
hitObject.StartTime = 1000000000000; hitObject.StartTime = 1000000000000;
hitObject.Scale = 1.5f; hitObject.Scale = 1.5f;
hitObject.Samples.Clear(); // otherwise crash due to samples not loaded
d.Anchor = Anchor.Centre; d.Anchor = Anchor.Centre;
d.RelativePositionAxes = Axes.None; d.RelativePositionAxes = Axes.None;