2019-01-24 16:43:03 +08:00
|
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
2018-04-13 17:19:50 +08:00
|
|
|
|
|
2022-06-17 15:37:17 +08:00
|
|
|
|
#nullable disable
|
|
|
|
|
|
2020-08-21 00:16:32 +08:00
|
|
|
|
using System.Collections.Generic;
|
2018-04-13 17:19:50 +08:00
|
|
|
|
using System.Linq;
|
2020-08-21 00:16:32 +08:00
|
|
|
|
using osu.Game.Audio;
|
2018-04-13 17:19:50 +08:00
|
|
|
|
using osu.Game.Beatmaps;
|
|
|
|
|
using osu.Game.Rulesets.Catch.Objects;
|
|
|
|
|
using osu.Game.Rulesets.Catch.UI;
|
2018-11-01 14:38:19 +08:00
|
|
|
|
using osu.Game.Rulesets.Objects;
|
2018-04-13 17:19:50 +08:00
|
|
|
|
using osu.Game.Rulesets.Objects.Types;
|
|
|
|
|
using osu.Game.Tests.Visual;
|
2018-11-20 15:51:59 +08:00
|
|
|
|
using osuTK;
|
2018-04-13 17:19:50 +08:00
|
|
|
|
|
|
|
|
|
namespace osu.Game.Rulesets.Catch.Tests
|
|
|
|
|
{
|
2020-04-17 15:32:12 +08:00
|
|
|
|
public class TestSceneAutoJuiceStream : TestSceneCatchPlayer
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
2019-05-31 13:40:53 +08:00
|
|
|
|
protected override IBeatmap CreateBeatmap(RulesetInfo ruleset)
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
|
|
|
|
var beatmap = new Beatmap
|
|
|
|
|
{
|
|
|
|
|
BeatmapInfo = new BeatmapInfo
|
|
|
|
|
{
|
2022-01-18 21:57:39 +08:00
|
|
|
|
Difficulty = new BeatmapDifficulty { CircleSize = 6, SliderMultiplier = 3 },
|
2019-05-31 13:40:53 +08:00
|
|
|
|
Ruleset = ruleset
|
2018-04-13 17:19:50 +08:00
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < 100; i++)
|
|
|
|
|
{
|
2020-07-01 23:21:45 +08:00
|
|
|
|
float width = (i % 10 + 1) / 20f * CatchPlayfield.WIDTH;
|
2018-04-13 17:19:50 +08:00
|
|
|
|
|
|
|
|
|
beatmap.HitObjects.Add(new JuiceStream
|
|
|
|
|
{
|
2020-07-01 23:21:45 +08:00
|
|
|
|
X = CatchPlayfield.CENTER_X - width / 2,
|
2018-11-01 14:38:19 +08:00
|
|
|
|
Path = new SliderPath(PathType.Linear, new[]
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
|
|
|
|
Vector2.Zero,
|
2020-07-01 23:21:45 +08:00
|
|
|
|
new Vector2(width, 0)
|
2018-11-01 14:38:19 +08:00
|
|
|
|
}),
|
2018-04-13 17:19:50 +08:00
|
|
|
|
StartTime = i * 2000,
|
2020-08-21 00:16:32 +08:00
|
|
|
|
NewCombo = i % 8 == 0,
|
|
|
|
|
Samples = new List<HitSampleInfo>(new[]
|
|
|
|
|
{
|
2020-12-01 17:09:28 +08:00
|
|
|
|
new HitSampleInfo(HitSampleInfo.HIT_NORMAL, "normal", volume: 100)
|
2020-08-21 00:16:32 +08:00
|
|
|
|
})
|
2018-04-13 17:19:50 +08:00
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return beatmap;
|
|
|
|
|
}
|
|
|
|
|
|
2020-03-05 10:25:07 +08:00
|
|
|
|
protected override TestPlayer CreatePlayer(Ruleset ruleset)
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
2019-12-13 20:45:38 +08:00
|
|
|
|
SelectedMods.Value = SelectedMods.Value.Concat(new[] { ruleset.GetAutoplayMod() }).ToArray();
|
2018-06-06 19:21:47 +08:00
|
|
|
|
return base.CreatePlayer(ruleset);
|
2018-04-13 17:19:50 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|