mirror of
https://github.com/ppy/osu
synced 2025-03-19 17:44:30 +00:00
Merge pull request #9595 from LiterallyFabian/scaleMod
This commit is contained in:
commit
bb2d9bdc7e
@ -1,7 +1,9 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
// 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.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
|
using osu.Game.Configuration;
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Osu.Mods
|
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!";
|
public override string Description => "Hit them at the right size!";
|
||||||
|
|
||||||
protected override float StartScale => 2f;
|
[SettingSource("Starting Size", "The initial size multiplier applied to all objects.")]
|
||||||
|
public override BindableNumber<float> StartScale { get; } = new BindableFloat
|
||||||
|
{
|
||||||
|
MinValue = 1f,
|
||||||
|
MaxValue = 25f,
|
||||||
|
Default = 2f,
|
||||||
|
Value = 2f,
|
||||||
|
Precision = 0.1f,
|
||||||
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
// 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.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
|
using osu.Game.Configuration;
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Osu.Mods
|
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!";
|
public override string Description => "Hit them at the right size!";
|
||||||
|
|
||||||
protected override float StartScale => 0.5f;
|
[SettingSource("Starting Size", "The initial size multiplier applied to all objects.")]
|
||||||
|
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;
|
public override double ScoreMultiplier => 1;
|
||||||
|
|
||||||
protected virtual float StartScale => 1;
|
public abstract BindableNumber<float> StartScale { get; }
|
||||||
|
|
||||||
protected virtual float EndScale => 1;
|
protected virtual float EndScale => 1;
|
||||||
|
|
||||||
@ -68,7 +68,7 @@ namespace osu.Game.Rulesets.Osu.Mods
|
|||||||
case DrawableHitCircle _:
|
case DrawableHitCircle _:
|
||||||
{
|
{
|
||||||
using (drawable.BeginAbsoluteSequence(h.StartTime - h.TimePreempt))
|
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;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user