2021-06-22 03:47:24 +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.
|
|
|
|
|
2022-06-17 07:37:17 +00:00
|
|
|
#nullable disable
|
|
|
|
|
2021-06-22 03:47:24 +00:00
|
|
|
using System.Collections.Generic;
|
2022-10-06 09:06:16 +00:00
|
|
|
using osu.Framework.Bindables;
|
2021-06-22 03:47:24 +00: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 09:06:16 +00:00
|
|
|
public readonly BindableDouble TimeRangeMultiplier = new BindableDouble(1);
|
|
|
|
|
2021-06-22 03:47:24 +00:00
|
|
|
public DrawableCatchEditorRuleset(Ruleset ruleset, IBeatmap beatmap, IReadOnlyList<Mod> mods = null)
|
|
|
|
: base(ruleset, beatmap, mods)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2022-10-06 08:26:03 +00:00
|
|
|
protected override void Update()
|
|
|
|
{
|
|
|
|
base.Update();
|
|
|
|
|
|
|
|
double gamePlayTimeRange = GetTimeRange(Beatmap.Difficulty.ApproachRate);
|
2022-10-06 09:06:16 +00:00
|
|
|
float playfieldStretch = Playfield.DrawHeight / CatchPlayfield.HEIGHT;
|
|
|
|
TimeRange.Value = gamePlayTimeRange * TimeRangeMultiplier.Value * playfieldStretch;
|
2022-10-06 08:26:03 +00:00
|
|
|
}
|
|
|
|
|
2021-10-02 03:34:29 +00:00
|
|
|
protected override Playfield CreatePlayfield() => new CatchEditorPlayfield(Beatmap.Difficulty);
|
2022-10-06 08:26:03 +00:00
|
|
|
|
|
|
|
public override PlayfieldAdjustmentContainer CreatePlayfieldAdjustmentContainer() => new CatchEditorPlayfieldAdjustmentContainer();
|
2021-06-22 03:47:24 +00:00
|
|
|
}
|
|
|
|
}
|