2019-01-24 17:43:03 +09: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 18:19:50 +09:00
|
|
|
|
|
2020-08-20 18:16:32 +02:00
|
|
|
|
using System.Collections.Generic;
|
2018-04-04 16:24:03 +09:00
|
|
|
|
using System.Linq;
|
2020-08-20 18:16:32 +02:00
|
|
|
|
using osu.Game.Audio;
|
2018-04-04 16:24:03 +09:00
|
|
|
|
using osu.Game.Beatmaps;
|
|
|
|
|
using osu.Game.Rulesets.Catch.Objects;
|
|
|
|
|
using osu.Game.Rulesets.Catch.UI;
|
2018-11-01 15:38:19 +09:00
|
|
|
|
using osu.Game.Rulesets.Objects;
|
2018-04-04 16:24:03 +09:00
|
|
|
|
using osu.Game.Rulesets.Objects.Types;
|
|
|
|
|
using osu.Game.Tests.Visual;
|
2018-11-20 16:51:59 +09:00
|
|
|
|
using osuTK;
|
2018-04-13 18:19:50 +09:00
|
|
|
|
|
2018-04-04 16:24:03 +09:00
|
|
|
|
namespace osu.Game.Rulesets.Catch.Tests
|
|
|
|
|
{
|
2020-04-17 10:32:12 +03:00
|
|
|
|
public partial class TestSceneAutoJuiceStream : TestSceneCatchPlayer
|
2018-04-04 16:24:03 +09:00
|
|
|
|
{
|
2019-05-31 14:40:53 +09:00
|
|
|
|
protected override IBeatmap CreateBeatmap(RulesetInfo ruleset)
|
2018-04-04 16:24:03 +09:00
|
|
|
|
{
|
|
|
|
|
var beatmap = new Beatmap
|
|
|
|
|
{
|
|
|
|
|
BeatmapInfo = new BeatmapInfo
|
|
|
|
|
{
|
2022-01-18 22:57:39 +09:00
|
|
|
|
Difficulty = new BeatmapDifficulty { CircleSize = 6, SliderMultiplier = 3 },
|
2019-05-31 14:40:53 +09:00
|
|
|
|
Ruleset = ruleset
|
2018-04-04 16:24:03 +09:00
|
|
|
|
}
|
|
|
|
|
};
|
2018-04-13 18:19:50 +09:00
|
|
|
|
|
2018-04-04 16:24:03 +09:00
|
|
|
|
for (int i = 0; i < 100; i++)
|
|
|
|
|
{
|
2020-07-02 00:21:45 +09:00
|
|
|
|
float width = (i % 10 + 1) / 20f * CatchPlayfield.WIDTH;
|
2018-04-13 18:19:50 +09:00
|
|
|
|
|
2018-04-04 16:24:03 +09:00
|
|
|
|
beatmap.HitObjects.Add(new JuiceStream
|
|
|
|
|
{
|
2020-07-02 00:21:45 +09:00
|
|
|
|
X = CatchPlayfield.CENTER_X - width / 2,
|
2023-11-08 19:43:54 +09:00
|
|
|
|
Path = new SliderPath(PathType.LINEAR, new[]
|
2018-04-04 16:24:03 +09:00
|
|
|
|
{
|
|
|
|
|
Vector2.Zero,
|
2020-07-02 00:21:45 +09:00
|
|
|
|
new Vector2(width, 0)
|
2018-11-01 15:38:19 +09:00
|
|
|
|
}),
|
2018-04-04 16:24:03 +09:00
|
|
|
|
StartTime = i * 2000,
|
2020-08-20 18:16:32 +02:00
|
|
|
|
NewCombo = i % 8 == 0,
|
|
|
|
|
Samples = new List<HitSampleInfo>(new[]
|
|
|
|
|
{
|
2023-05-18 14:12:57 +09:00
|
|
|
|
new HitSampleInfo(HitSampleInfo.HIT_NORMAL)
|
2020-08-20 18:16:32 +02:00
|
|
|
|
})
|
2018-04-04 16:24:03 +09:00
|
|
|
|
});
|
|
|
|
|
}
|
2018-04-13 18:19:50 +09:00
|
|
|
|
|
2018-04-04 16:24:03 +09:00
|
|
|
|
return beatmap;
|
|
|
|
|
}
|
2018-04-13 18:19:50 +09:00
|
|
|
|
|
2020-03-05 11:25:07 +09:00
|
|
|
|
protected override TestPlayer CreatePlayer(Ruleset ruleset)
|
2018-04-04 16:24:03 +09:00
|
|
|
|
{
|
2019-12-13 21:45:38 +09:00
|
|
|
|
SelectedMods.Value = SelectedMods.Value.Concat(new[] { ruleset.GetAutoplayMod() }).ToArray();
|
2018-06-06 20:21:47 +09:00
|
|
|
|
return base.CreatePlayer(ruleset);
|
2018-04-04 16:24:03 +09:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|