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