mirror of
https://github.com/ppy/osu
synced 2025-02-04 20:32:12 +00:00
Added slider for the grow/deflate mod
This commit is contained in:
parent
fb5a54d242
commit
9857779d42
@ -1,7 +1,9 @@
|
||||
// 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 osu.Framework.Bindables;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Game.Configuration;
|
||||
|
||||
namespace osu.Game.Rulesets.Osu.Mods
|
||||
{
|
||||
@ -15,6 +17,14 @@ namespace osu.Game.Rulesets.Osu.Mods
|
||||
|
||||
public override string Description => "Hit them at the right size!";
|
||||
|
||||
protected override float StartScale => 2f;
|
||||
[SettingSource("Starting size", "The object starting size")]
|
||||
public override BindableNumber<float> StartScale { get; } = new BindableFloat
|
||||
{
|
||||
MinValue = 1f,
|
||||
MaxValue = 15f,
|
||||
Default = 2f,
|
||||
Value = 2f,
|
||||
Precision = 0.1f,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,9 @@
|
||||
// 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 osu.Framework.Bindables;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Game.Configuration;
|
||||
|
||||
namespace osu.Game.Rulesets.Osu.Mods
|
||||
{
|
||||
@ -15,6 +17,14 @@ namespace osu.Game.Rulesets.Osu.Mods
|
||||
|
||||
public override string Description => "Hit them at the right size!";
|
||||
|
||||
protected override float StartScale => 0.5f;
|
||||
[SettingSource("Starting size", "The object starting size")]
|
||||
public override BindableNumber<float> StartScale { get; } = new BindableFloat
|
||||
{
|
||||
MinValue = 0f,
|
||||
MaxValue = 0.99f,
|
||||
Default = 0.5f,
|
||||
Value = 0.5f,
|
||||
Precision = 0.01f,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ namespace osu.Game.Rulesets.Osu.Mods
|
||||
|
||||
public override double ScoreMultiplier => 1;
|
||||
|
||||
protected virtual float StartScale => 1;
|
||||
public abstract BindableNumber<float> StartScale { get; }
|
||||
|
||||
protected virtual float EndScale => 1;
|
||||
|
||||
@ -68,7 +68,7 @@ namespace osu.Game.Rulesets.Osu.Mods
|
||||
case DrawableHitCircle _:
|
||||
{
|
||||
using (drawable.BeginAbsoluteSequence(h.StartTime - h.TimePreempt))
|
||||
drawable.ScaleTo(StartScale).Then().ScaleTo(EndScale, h.TimePreempt, Easing.OutSine);
|
||||
drawable.ScaleTo(StartScale.Value).Then().ScaleTo(EndScale, h.TimePreempt, Easing.OutSine);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user