2016-10-07 07:24:46 +00: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-14 23:23:27 +00:00
|
|
|
|
using osu.Game.GameModes.Play.Osu;
|
2016-10-07 07:05:02 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
2016-10-14 23:23:27 +00:00
|
|
|
|
namespace osu.Game.GameModes.Play.Catch
|
2016-10-07 07:05:02 +00:00
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
2016-10-07 21:14:35 +00:00
|
|
|
|
/// Similar to Standard, but without the 'x' and has tinted pop-ups. Used in osu!catch.
|
2016-10-07 07:05:02 +00:00
|
|
|
|
/// </summary>
|
2016-10-14 23:23:27 +00:00
|
|
|
|
public class CatchComboCounter : OsuComboCounter
|
2016-10-07 07:05:02 +00:00
|
|
|
|
{
|
2016-10-14 23:23:27 +00:00
|
|
|
|
protected override bool CanPopOutWhenBackwards => true;
|
2016-10-07 07:05:02 +00:00
|
|
|
|
|
2016-10-14 23:23:27 +00:00
|
|
|
|
protected override string FormatCount(ulong count)
|
2016-10-07 07:05:02 +00:00
|
|
|
|
{
|
|
|
|
|
return count.ToString("#,0");
|
|
|
|
|
}
|
|
|
|
|
|
2016-10-14 00:50:06 +00:00
|
|
|
|
public override void Roll(ulong newValue = 0)
|
2016-10-13 02:33:55 +00:00
|
|
|
|
{
|
2016-10-14 23:23:27 +00:00
|
|
|
|
PopOutSpriteText.Colour = CountSpriteText.Colour;
|
2016-10-13 02:33:55 +00:00
|
|
|
|
|
2016-10-14 00:50:06 +00:00
|
|
|
|
base.Roll(newValue);
|
2016-10-07 07:05:02 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2016-10-07 22:15:36 +00:00
|
|
|
|
/// Increaces counter and tints pop-out before animation.
|
2016-10-07 07:05:02 +00:00
|
|
|
|
/// </summary>
|
2016-10-07 22:15:36 +00:00
|
|
|
|
/// <param name="colour">Last grabbed fruit colour.</param>
|
2016-10-07 07:05:02 +00:00
|
|
|
|
public void CatchFruit(Color4 colour)
|
|
|
|
|
{
|
2016-10-14 23:23:27 +00:00
|
|
|
|
PopOutSpriteText.Colour = colour;
|
2016-10-07 07:05:02 +00:00
|
|
|
|
Count++;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|