2020-11-27 10:42:14 +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.
|
|
|
|
|
|
2022-06-17 15:37:17 +08:00
|
|
|
|
#nullable disable
|
|
|
|
|
|
2020-11-27 10:42:14 +08:00
|
|
|
|
using osu.Framework.Bindables;
|
|
|
|
|
using osu.Game.Rulesets.Catch.Objects;
|
|
|
|
|
using osu.Game.Rulesets.Catch.Objects.Drawables;
|
|
|
|
|
|
|
|
|
|
namespace osu.Game.Rulesets.Catch.Tests
|
|
|
|
|
{
|
2022-11-24 13:32:20 +08:00
|
|
|
|
public partial class TestSceneFruitVisualChange : TestSceneFruitObjects
|
2020-11-27 10:42:14 +08:00
|
|
|
|
{
|
|
|
|
|
private readonly Bindable<int> indexInBeatmap = new Bindable<int>();
|
|
|
|
|
private readonly Bindable<bool> hyperDash = new Bindable<bool>();
|
|
|
|
|
|
|
|
|
|
protected override void LoadComplete()
|
|
|
|
|
{
|
2021-06-02 15:04:53 +08:00
|
|
|
|
AddStep("fruit changes visual and hyper", () => SetContents(_ => new TestDrawableCatchHitObjectSpecimen(new DrawableFruit(new Fruit
|
2020-11-27 10:42:14 +08:00
|
|
|
|
{
|
|
|
|
|
IndexInBeatmapBindable = { BindTarget = indexInBeatmap },
|
|
|
|
|
HyperDashBindable = { BindTarget = hyperDash },
|
|
|
|
|
}))));
|
|
|
|
|
|
2021-06-02 15:04:53 +08:00
|
|
|
|
AddStep("droplet changes hyper", () => SetContents(_ => new TestDrawableCatchHitObjectSpecimen(new DrawableDroplet(new Droplet
|
2020-11-27 10:42:14 +08:00
|
|
|
|
{
|
|
|
|
|
HyperDashBindable = { BindTarget = hyperDash },
|
|
|
|
|
}))));
|
|
|
|
|
|
|
|
|
|
Scheduler.AddDelayed(() => indexInBeatmap.Value++, 250, true);
|
|
|
|
|
Scheduler.AddDelayed(() => hyperDash.Value = !hyperDash.Value, 1000, true);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|