mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 06:33:20 +08:00
Remove DisplayInitialCombo method for simplicity
This commit is contained in:
parent
92cda6bccb
commit
08d8975566
@ -50,11 +50,17 @@ namespace osu.Game.Rulesets.Catch.Skinning
|
||||
};
|
||||
}
|
||||
|
||||
public void DisplayInitialCombo(int combo) => updateCombo(combo, null, true);
|
||||
public void UpdateCombo(int combo, Color4? hitObjectColour) => updateCombo(combo, hitObjectColour, false);
|
||||
private int lastDisplayedCombo;
|
||||
|
||||
private void updateCombo(int combo, Color4? hitObjectColour, bool immediate)
|
||||
public void UpdateCombo(int combo, Color4? hitObjectColour = null)
|
||||
{
|
||||
bool immediate = Time.Elapsed < 0;
|
||||
|
||||
if (combo == lastDisplayedCombo)
|
||||
return;
|
||||
|
||||
lastDisplayedCombo = combo;
|
||||
|
||||
// There may still be existing transforms to the counter (including value change after 250ms),
|
||||
// finish them immediately before new transforms.
|
||||
counter.FinishTransforms();
|
||||
|
@ -28,7 +28,7 @@ namespace osu.Game.Rulesets.Catch.UI
|
||||
protected override void SkinChanged(ISkinSource skin, bool allowFallback)
|
||||
{
|
||||
base.SkinChanged(skin, allowFallback);
|
||||
ComboCounter?.DisplayInitialCombo(currentCombo);
|
||||
ComboCounter?.UpdateCombo(currentCombo);
|
||||
}
|
||||
|
||||
public void OnNewResult(DrawableCatchHitObject judgedObject, JudgementResult result)
|
||||
|
@ -11,16 +11,6 @@ namespace osu.Game.Rulesets.Catch.UI
|
||||
/// </summary>
|
||||
public interface ICatchComboCounter : IDrawable
|
||||
{
|
||||
/// <summary>
|
||||
/// Updates the counter to display the provided <paramref name="combo"/> as initial value.
|
||||
/// The value should be immediately displayed without any animation.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This is required for when instantiating a combo counter in middle of accumulating combo (via skin change).
|
||||
/// </remarks>
|
||||
/// <param name="combo">The combo value to be displayed as initial.</param>
|
||||
void DisplayInitialCombo(int combo);
|
||||
|
||||
/// <summary>
|
||||
/// Updates the counter to animate a transition from the old combo value it had to the current provided one.
|
||||
/// </summary>
|
||||
@ -29,6 +19,6 @@ namespace osu.Game.Rulesets.Catch.UI
|
||||
/// </remarks>
|
||||
/// <param name="combo">The new combo value.</param>
|
||||
/// <param name="hitObjectColour">The colour of the object if hit, null on miss.</param>
|
||||
void UpdateCombo(int combo, Color4? hitObjectColour);
|
||||
void UpdateCombo(int combo, Color4? hitObjectColour = null);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user