1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-09 09:37:42 +08:00
osu-lazer/osu.Game/Screens/Play/HUD/ComboResultCounter.cs
Thomas Müller a5e610a7ba Update framework and fix compilation
Most issues were related to BeginLoopedSequence usage and lack of
"this." in front of transform helpers.
2017-07-14 19:18:12 +03:00

33 lines
1.0 KiB
C#

// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Graphics;
using osu.Game.Graphics.UserInterface;
namespace osu.Game.Screens.Play.HUD
{
/// <summary>
/// Used to display combo with a roll-up animation in results screen.
/// </summary>
public class ComboResultCounter : RollingCounter<long>
{
protected override double RollingDuration => 500;
protected override EasingTypes RollingEasing => EasingTypes.Out;
protected override double GetProportionalDuration(long currentValue, long newValue)
{
return currentValue > newValue ? currentValue - newValue : newValue - currentValue;
}
protected override string FormatCount(long count)
{
return $@"{count}x";
}
public override void Increment(long amount)
{
Current.Value = Current + amount;
}
}
}