1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-18 05:52:55 +08:00
osu-lazer/osu.Game/GameModes/Play/Catch/CatchComboCounter.cs

44 lines
1.2 KiB
C#
Raw Normal View History

2016-10-07 15:24:46 +08:00
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using OpenTK.Graphics;
2016-10-15 07:23:27 +08:00
using osu.Game.GameModes.Play.Osu;
2016-10-07 15:05:02 +08:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
2016-10-15 07:23:27 +08:00
namespace osu.Game.GameModes.Play.Catch
2016-10-07 15:05:02 +08:00
{
/// <summary>
2016-10-08 05:14:35 +08:00
/// Similar to Standard, but without the 'x' and has tinted pop-ups. Used in osu!catch.
2016-10-07 15:05:02 +08:00
/// </summary>
2016-10-15 07:23:27 +08:00
public class CatchComboCounter : OsuComboCounter
2016-10-07 15:05:02 +08:00
{
2016-10-15 07:23:27 +08:00
protected override bool CanPopOutWhenBackwards => true;
2016-10-07 15:05:02 +08:00
2016-10-15 07:23:27 +08:00
protected override string FormatCount(ulong count)
2016-10-07 15:05:02 +08:00
{
return count.ToString("#,0");
}
2016-10-14 08:50:06 +08:00
public override void Roll(ulong newValue = 0)
{
2016-10-15 07:23:27 +08:00
PopOutSpriteText.Colour = CountSpriteText.Colour;
2016-10-14 08:50:06 +08:00
base.Roll(newValue);
2016-10-07 15:05:02 +08:00
}
/// <summary>
2016-10-08 06:15:36 +08:00
/// Increaces counter and tints pop-out before animation.
2016-10-07 15:05:02 +08:00
/// </summary>
2016-10-08 06:15:36 +08:00
/// <param name="colour">Last grabbed fruit colour.</param>
2016-10-07 15:05:02 +08:00
public void CatchFruit(Color4 colour)
{
2016-10-15 07:23:27 +08:00
PopOutSpriteText.Colour = colour;
2016-10-07 15:05:02 +08:00
Count++;
}
}
}