mirror of https://github.com/ppy/osu
replace easement with easing
This commit is contained in:
parent
4e01db03bb
commit
569c39942a
|
@ -17,7 +17,7 @@ public void TestMagnetised(float strength)
|
|||
{
|
||||
Mod = new OsuModMagnetised
|
||||
{
|
||||
EasementStrength = { Value = strength },
|
||||
EasingStrength = { Value = strength },
|
||||
},
|
||||
PassCondition = () => true,
|
||||
Autoplay = false,
|
||||
|
|
|
@ -17,7 +17,7 @@ public void TestRepel(float strength)
|
|||
{
|
||||
Mod = new OsuModRepel
|
||||
{
|
||||
EasementStrength = { Value = strength },
|
||||
EasingStrength = { Value = strength },
|
||||
},
|
||||
PassCondition = () => true,
|
||||
Autoplay = false,
|
||||
|
|
|
@ -20,8 +20,8 @@ public abstract class OsuEaseHitObjectPositionsMod : Mod, IUpdatableByPlayfield,
|
|||
public override double ScoreMultiplier => 1;
|
||||
public override Type[] IncompatibleMods => new[] { typeof(OsuModAutopilot), typeof(OsuModWiggle), typeof(OsuModTransform), typeof(ModAutoplay) };
|
||||
|
||||
public abstract BindableFloat EasementStrength { get; }
|
||||
protected virtual float EasementStrengthMultiplier => 1.0f;
|
||||
public abstract BindableFloat EasingStrength { get; }
|
||||
protected virtual float EasingStrengthMultiplier => 1.0f;
|
||||
protected Vector2 CursorPosition;
|
||||
protected DrawableHitObject WorkingHitObject;
|
||||
protected abstract Vector2 DestinationVector { get; }
|
||||
|
@ -66,7 +66,7 @@ public void Update(Playfield playfield)
|
|||
|
||||
private void easeHitObjectPositionToVector(DrawableHitObject hitObject, Vector2 destination)
|
||||
{
|
||||
double dampLength = Interpolation.Lerp(3000, 40, EasementStrength.Value * EasementStrengthMultiplier);
|
||||
double dampLength = Interpolation.Lerp(3000, 40, EasingStrength.Value * EasingStrengthMultiplier);
|
||||
|
||||
float x = (float)Interpolation.DampContinuously(hitObject.X, destination.X, dampLength, gameplayClock.ElapsedFrameTime);
|
||||
float y = (float)Interpolation.DampContinuously(hitObject.Y, destination.Y, dampLength, gameplayClock.ElapsedFrameTime);
|
||||
|
|
|
@ -21,7 +21,7 @@ internal class OsuModMagnetised : OsuEaseHitObjectPositionsMod
|
|||
protected override Vector2 DestinationVector => CursorPosition;
|
||||
|
||||
[SettingSource("Attraction strength", "How strong the pull is.", 0)]
|
||||
public override BindableFloat EasementStrength { get; } = new BindableFloat(0.5f)
|
||||
public override BindableFloat EasingStrength { get; } = new BindableFloat(0.5f)
|
||||
{
|
||||
Precision = 0.05f,
|
||||
MinValue = 0.05f,
|
||||
|
|
|
@ -20,14 +20,14 @@ internal class OsuModRepel : OsuEaseHitObjectPositionsMod
|
|||
public override Type[] IncompatibleMods => base.IncompatibleMods.Append(typeof(OsuModMagnetised)).ToArray();
|
||||
|
||||
[SettingSource("Repulsion strength", "How strong the repulsion is.", 0)]
|
||||
public override BindableFloat EasementStrength { get; } = new BindableFloat(0.6f)
|
||||
public override BindableFloat EasingStrength { get; } = new BindableFloat(0.6f)
|
||||
{
|
||||
Precision = 0.05f,
|
||||
MinValue = 0.05f,
|
||||
MaxValue = 1.0f,
|
||||
};
|
||||
|
||||
protected override float EasementStrengthMultiplier => 0.8f;
|
||||
protected override float EasingStrengthMultiplier => 0.8f;
|
||||
|
||||
protected override Vector2 DestinationVector
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue