mirror of
https://github.com/ppy/osu
synced 2024-12-11 09:27:08 +00:00
Remove triangles skin specific implementation from base DrawableHit
This commit is contained in:
parent
49f530910c
commit
aa7d0e2c96
@ -201,12 +201,9 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
||||
break;
|
||||
|
||||
case ArmedState.Hit:
|
||||
// If we're far enough away from the left stage, we should bring outselves in front of it
|
||||
// If we're far enough away from the left stage, we should bring ourselves in front of it
|
||||
ProxyContent();
|
||||
|
||||
var flash = (MainPiece.Drawable as CirclePiece)?.FlashBox;
|
||||
flash?.FadeTo(0.9f).FadeOut(300);
|
||||
|
||||
const float gravity_time = 300;
|
||||
const float gravity_travel_height = 200;
|
||||
|
||||
|
@ -76,7 +76,7 @@ namespace osu.Game.Rulesets.Taiko.Skinning.Default
|
||||
|
||||
private readonly Container background;
|
||||
|
||||
public Box FlashBox;
|
||||
private readonly Box flashBox;
|
||||
|
||||
protected CirclePiece()
|
||||
{
|
||||
@ -122,7 +122,7 @@ namespace osu.Game.Rulesets.Taiko.Skinning.Default
|
||||
Masking = true,
|
||||
Children = new[]
|
||||
{
|
||||
FlashBox = new Box
|
||||
flashBox = new Box
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
@ -144,6 +144,25 @@ namespace osu.Game.Rulesets.Taiko.Skinning.Default
|
||||
});
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
||||
drawableHitObject.ApplyCustomUpdateState += updateStateTransforms;
|
||||
updateStateTransforms(drawableHitObject, drawableHitObject.State.Value);
|
||||
}
|
||||
|
||||
private void updateStateTransforms(DrawableHitObject drawableHitObject, ArmedState state)
|
||||
{
|
||||
switch (state)
|
||||
{
|
||||
case ArmedState.Hit:
|
||||
using (BeginAbsoluteSequence(drawableHitObject.HitStateUpdateTime))
|
||||
flashBox?.FadeTo(0.9f).FadeOut(300);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private const float edge_alpha_kiai = 0.5f;
|
||||
|
||||
private void resetEdgeEffects()
|
||||
@ -166,7 +185,7 @@ namespace osu.Game.Rulesets.Taiko.Skinning.Default
|
||||
|
||||
if (drawableHitObject.State.Value == ArmedState.Idle)
|
||||
{
|
||||
FlashBox
|
||||
flashBox
|
||||
.FadeTo(flash_opacity)
|
||||
.Then()
|
||||
.FadeOut(timingPoint.BeatLength * 0.75, Easing.OutSine);
|
||||
|
Loading…
Reference in New Issue
Block a user