mirror of
https://github.com/ppy/osu.git
synced 2026-05-13 20:33:35 +08:00
Change taiko hit flying animation to be rate independent (#37541)
While the default hasn't changed, users that prefer how stable behaved can now toggle the new toggle to get their preferred animation behaviour back. https://github.com/user-attachments/assets/eb4f5c5c-5860-428c-8e4e-bcf4dbe859d7 --- Alternative to and closes https://github.com/ppy/osu/pull/37529. See https://github.com/ppy/osu/discussions/37131. --------- Co-authored-by: Dan Balasescu <smoogipoo@smgi.me> Co-authored-by: Walavouchey <36758269+Walavouchey@users.noreply.github.com> Co-authored-by: Bartłomiej Dach <dach.bartlomiej@gmail.com>
This commit is contained in:
committed by
GitHub
Unverified
parent
5bdbf5c61f
commit
9ac31c0271
@@ -18,11 +18,13 @@ namespace osu.Game.Rulesets.Taiko.Configuration
|
||||
base.InitialiseDefaults();
|
||||
|
||||
SetDefault(TaikoRulesetSetting.TouchControlScheme, TaikoTouchControlScheme.KDDK);
|
||||
SetDefault(TaikoRulesetSetting.RateAdjustedHitAnimation, true);
|
||||
}
|
||||
}
|
||||
|
||||
public enum TaikoRulesetSetting
|
||||
{
|
||||
TouchControlScheme
|
||||
TouchControlScheme,
|
||||
RateAdjustedHitAnimation,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,12 +7,15 @@ using System;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using JetBrains.Annotations;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Input.Events;
|
||||
using osu.Game.Rulesets.Objects.Drawables;
|
||||
using osu.Game.Rulesets.Scoring;
|
||||
using osu.Game.Rulesets.Taiko.Configuration;
|
||||
using osu.Game.Rulesets.Taiko.Skinning.Default;
|
||||
using osu.Game.Screens.Play;
|
||||
using osu.Game.Skinning;
|
||||
using osuTK;
|
||||
|
||||
@@ -34,12 +37,15 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
||||
private set;
|
||||
}
|
||||
|
||||
private bool validActionPressed;
|
||||
|
||||
private double? lastPressHandleTime;
|
||||
[Resolved(CanBeNull = true)]
|
||||
private TaikoRulesetConfigManager taikoConfig { get; set; }
|
||||
|
||||
private readonly Bindable<bool> rateAdjustedHitAnimations = new Bindable<bool>(true);
|
||||
private readonly Bindable<HitType> type = new Bindable<HitType>();
|
||||
|
||||
private bool validActionPressed;
|
||||
private double? lastPressHandleTime;
|
||||
|
||||
public DrawableHit()
|
||||
: this(null)
|
||||
{
|
||||
@@ -51,6 +57,12 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
||||
FillMode = FillMode.Fit;
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
taikoConfig?.BindWith(TaikoRulesetSetting.RateAdjustedHitAnimation, rateAdjustedHitAnimations);
|
||||
}
|
||||
|
||||
protected override void OnApply()
|
||||
{
|
||||
type.BindTo(HitObject.TypeBindable);
|
||||
@@ -168,11 +180,15 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
||||
if (SnapJudgementLocation)
|
||||
MainPiece.MoveToX(-X);
|
||||
|
||||
this.ScaleTo(0.8f, gravity_time * 2, Easing.OutQuad);
|
||||
// Rate independent to match stable.
|
||||
double rate = (Clock as IGameplayClock)?.GetTrueGameplayRate() ?? Clock.Rate;
|
||||
double length = gravity_time * (rateAdjustedHitAnimations.Value ? 1 : rate);
|
||||
|
||||
this.MoveToY(-gravity_travel_height, gravity_time, Easing.Out)
|
||||
this.ScaleTo(0.8f, length * 2, Easing.OutQuad);
|
||||
|
||||
this.MoveToY(-gravity_travel_height, length, Easing.Out)
|
||||
.Then()
|
||||
.MoveToY(gravity_travel_height * 2, gravity_time * 2, Easing.In);
|
||||
.MoveToY(gravity_travel_height * 2, length * 2, Easing.In);
|
||||
|
||||
this.FadeOut(800);
|
||||
break;
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.UserInterface;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Graphics.UserInterfaceV2;
|
||||
using osu.Game.Localisation;
|
||||
@@ -31,7 +32,16 @@ namespace osu.Game.Rulesets.Taiko
|
||||
{
|
||||
Caption = RulesetSettingsStrings.TouchControlScheme,
|
||||
Current = config.GetBindable<TaikoTouchControlScheme>(TaikoRulesetSetting.TouchControlScheme)
|
||||
}),
|
||||
new SettingsItemV2(new FormCheckBox
|
||||
{
|
||||
Caption = RulesetSettingsStrings.RateAdjustedHitAnimation,
|
||||
HintText = RulesetSettingsStrings.RateAdjustedHitAnimationTooltip,
|
||||
Current = config.GetBindable<bool>(TaikoRulesetSetting.RateAdjustedHitAnimation)
|
||||
})
|
||||
{
|
||||
ApplyClassicDefault = c => ((IHasCurrentValue<bool>)c).Current.Value = false,
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,6 +79,16 @@ namespace osu.Game.Localisation
|
||||
/// </summary>
|
||||
public static LocalisableString TimingBasedColouring => new TranslatableString(getKey(@"Timing_based_colouring"), @"Timing-based note colouring");
|
||||
|
||||
/// <summary>
|
||||
/// "Rate-adjusted hit animations"
|
||||
/// </summary>
|
||||
public static LocalisableString RateAdjustedHitAnimation => new TranslatableString(getKey(@"rate_adjusted_hit_animation"), @"Rate-adjusted hit animations");
|
||||
|
||||
/// <summary>
|
||||
/// "Hits will fly faster or slower when beatmap rate is adjusted via mods."
|
||||
/// </summary>
|
||||
public static LocalisableString RateAdjustedHitAnimationTooltip => new TranslatableString(getKey(@"rate_adjusted_hit_animation_tooltip"), @"Hits will fly faster or slower when beatmap rate is adjusted via mods.");
|
||||
|
||||
/// <summary>
|
||||
/// "{0}ms (speed {1:N1})"
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user