2021-06-22 11:47:24 +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.
|
|
|
|
|
|
|
|
using System.Collections.Generic;
|
2022-10-06 17:06:16 +08:00
|
|
|
using osu.Framework.Bindables;
|
2021-06-22 11:47:24 +08:00
|
|
|
using osu.Game.Beatmaps;
|
|
|
|
using osu.Game.Rulesets.Catch.UI;
|
|
|
|
using osu.Game.Rulesets.Mods;
|
|
|
|
using osu.Game.Rulesets.UI;
|
|
|
|
|
|
|
|
namespace osu.Game.Rulesets.Catch.Edit
|
|
|
|
{
|
|
|
|
public partial class DrawableCatchEditorRuleset : DrawableCatchRuleset
|
|
|
|
{
|
2022-10-06 17:06:16 +08:00
|
|
|
public readonly BindableDouble TimeRangeMultiplier = new BindableDouble(1);
|
|
|
|
|
2023-01-15 15:00:34 +08:00
|
|
|
public DrawableCatchEditorRuleset(Ruleset ruleset, IBeatmap beatmap, IReadOnlyList<Mod>? mods = null)
|
2021-06-22 11:47:24 +08:00
|
|
|
: base(ruleset, beatmap, mods)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2022-10-06 16:26:03 +08:00
|
|
|
protected override void Update()
|
|
|
|
{
|
|
|
|
base.Update();
|
|
|
|
|
|
|
|
double gamePlayTimeRange = GetTimeRange(Beatmap.Difficulty.ApproachRate);
|
2022-10-06 17:06:16 +08:00
|
|
|
float playfieldStretch = Playfield.DrawHeight / CatchPlayfield.HEIGHT;
|
|
|
|
TimeRange.Value = gamePlayTimeRange * TimeRangeMultiplier.Value * playfieldStretch;
|
2022-10-06 16:26:03 +08:00
|
|
|
}
|
|
|
|
|
2021-10-02 11:34:29 +08:00
|
|
|
protected override Playfield CreatePlayfield() => new CatchEditorPlayfield(Beatmap.Difficulty);
|
2022-10-06 16:26:03 +08:00
|
|
|
|
|
|
|
public override PlayfieldAdjustmentContainer CreatePlayfieldAdjustmentContainer() => new CatchEditorPlayfieldAdjustmentContainer();
|
2021-06-22 11:47:24 +08:00
|
|
|
}
|
|
|
|
}
|