1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 20:22:55 +08:00

Make kiai time hit object pulse on bar line beats.

This commit is contained in:
smoogipooo 2017-05-23 17:36:35 +09:00
parent 4c66157a07
commit 25a48d832f
3 changed files with 19 additions and 6 deletions

@ -1 +1 @@
Subproject commit 773d60eb6b811f395e32a22dc66bb4d2e63a6dbc
Subproject commit 71177efb0c416361e4b346a92dd61ab20bf333d0

View File

@ -7,6 +7,8 @@ using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites;
using osu.Game.Graphics.Backgrounds;
using OpenTK.Graphics;
using osu.Game.Beatmaps.ControlPoints;
using osu.Framework.Audio.Track;
namespace osu.Game.Rulesets.Taiko.Objects.Drawables.Pieces
{
@ -148,5 +150,18 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables.Pieces
Radius = KiaiMode ? 40 : 8
};
}
protected override void OnNewBeat(int beatIndex, TimingControlPoint timingPoint, EffectControlPoint effectPoint, TrackAmplitudes amplitudes)
{
if (!effectPoint.KiaiMode)
return;
if (beatIndex % (int)timingPoint.TimeSignature != 0)
return;
background.FadeEdgeEffectTo(Color4.White);
using (BeginDelayedSequence(200))
background.FadeEdgeEffectTo(AccentColour, 500, EasingTypes.OutQuint);
}
}
}

View File

@ -5,10 +5,11 @@ using osu.Framework.Graphics.Containers;
using osu.Game.Graphics;
using OpenTK;
using OpenTK.Graphics;
using osu.Game.Graphics.Containers;
namespace osu.Game.Rulesets.Taiko.Objects.Drawables.Pieces
{
public class TaikoPiece : Container, IHasAccentColour
public class TaikoPiece : BeatSyncedContainer, IHasAccentColour
{
private Color4 accentColour;
/// <summary>
@ -17,10 +18,7 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables.Pieces
public virtual Color4 AccentColour
{
get { return accentColour; }
set
{
accentColour = value;
}
set { accentColour = value; }
}
private bool kiaiMode;