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

Implement kiai flashing for "triangles" taiko skin

This commit is contained in:
Joppe27 2022-10-18 23:55:40 +02:00
parent a21acdb5bc
commit 003e4247f9

View File

@ -3,6 +3,7 @@
#nullable disable
using System;
using osu.Framework.Audio.Track;
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics;
@ -32,6 +33,8 @@ namespace osu.Game.Rulesets.Taiko.Skinning.Default
private const double pre_beat_transition_time = 80;
private const float flash_opacity = 0.3f;
private Color4 accentColour;
/// <summary>
@ -157,6 +160,13 @@ namespace osu.Game.Rulesets.Taiko.Skinning.Default
if (!effectPoint.KiaiMode)
return;
FlashBox
// Make sure the hit indicator usage of FlashBox doesn't get faded out prematurely by a kiai flash
.DelayUntilTransformsFinished()
.FadeTo(flash_opacity, 0, Easing.OutQuint)
.Then()
.FadeOut(Math.Max(80, timingPoint.BeatLength - 80), Easing.OutSine);
if (beatIndex % timingPoint.TimeSignature.Numerator != 0)
return;