mirror of
https://github.com/osukey/osukey.git
synced 2025-05-30 01:47:30 +09:00
scale down repulsion strength
This commit is contained in:
parent
f21c9fb520
commit
f54a68f6ca
@ -21,6 +21,7 @@ namespace osu.Game.Rulesets.Osu.Mods
|
|||||||
public override Type[] IncompatibleMods => new[] { typeof(OsuModAutopilot), typeof(OsuModWiggle), typeof(OsuModTransform), typeof(ModAutoplay) };
|
public override Type[] IncompatibleMods => new[] { typeof(OsuModAutopilot), typeof(OsuModWiggle), typeof(OsuModTransform), typeof(ModAutoplay) };
|
||||||
|
|
||||||
public abstract BindableFloat EasementStrength { get; }
|
public abstract BindableFloat EasementStrength { get; }
|
||||||
|
protected virtual float EasementStrengthMultiplier => 1.0f;
|
||||||
protected Vector2 CursorPosition;
|
protected Vector2 CursorPosition;
|
||||||
protected DrawableHitObject WorkingHitObject;
|
protected DrawableHitObject WorkingHitObject;
|
||||||
protected abstract Vector2 DestinationVector { get; }
|
protected abstract Vector2 DestinationVector { get; }
|
||||||
@ -65,7 +66,7 @@ namespace osu.Game.Rulesets.Osu.Mods
|
|||||||
|
|
||||||
private void easeHitObjectPositionToVector(DrawableHitObject hitObject, Vector2 destination)
|
private void easeHitObjectPositionToVector(DrawableHitObject hitObject, Vector2 destination)
|
||||||
{
|
{
|
||||||
double dampLength = Interpolation.Lerp(3000, 40, EasementStrength.Value);
|
double dampLength = Interpolation.Lerp(3000, 40, EasementStrength.Value * EasementStrengthMultiplier);
|
||||||
|
|
||||||
float x = (float)Interpolation.DampContinuously(hitObject.X, destination.X, dampLength, gameplayClock.ElapsedFrameTime);
|
float x = (float)Interpolation.DampContinuously(hitObject.X, destination.X, dampLength, gameplayClock.ElapsedFrameTime);
|
||||||
float y = (float)Interpolation.DampContinuously(hitObject.Y, destination.Y, dampLength, gameplayClock.ElapsedFrameTime);
|
float y = (float)Interpolation.DampContinuously(hitObject.Y, destination.Y, dampLength, gameplayClock.ElapsedFrameTime);
|
||||||
|
@ -22,13 +22,15 @@ namespace osu.Game.Rulesets.Osu.Mods
|
|||||||
public override Type[] IncompatibleMods => base.IncompatibleMods.Append(typeof(OsuModMagnetised)).ToArray();
|
public override Type[] IncompatibleMods => base.IncompatibleMods.Append(typeof(OsuModMagnetised)).ToArray();
|
||||||
|
|
||||||
[SettingSource("Repulsion strength", "How strong the repulsion is.", 0)]
|
[SettingSource("Repulsion strength", "How strong the repulsion is.", 0)]
|
||||||
public override BindableFloat EasementStrength { get; } = new BindableFloat(0.5f)
|
public override BindableFloat EasementStrength { get; } = new BindableFloat(0.6f)
|
||||||
{
|
{
|
||||||
Precision = 0.05f,
|
Precision = 0.05f,
|
||||||
MinValue = 0.05f,
|
MinValue = 0.05f,
|
||||||
MaxValue = 1.0f,
|
MaxValue = 1.0f,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
protected override float EasementStrengthMultiplier => 0.8f;
|
||||||
|
|
||||||
protected override Vector2 DestinationVector
|
protected override Vector2 DestinationVector
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
Loading…
x
Reference in New Issue
Block a user