mirror of
https://github.com/osukey/osukey.git
synced 2025-05-04 13:17:22 +09:00
Fix skin changes resulting in incorrectly applied transforms in MainCirclePiece
This commit is contained in:
parent
2d1db6a22d
commit
b069372b29
@ -42,10 +42,13 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
|
|||||||
private readonly IBindable<Color4> accentColour = new Bindable<Color4>();
|
private readonly IBindable<Color4> accentColour = new Bindable<Color4>();
|
||||||
private readonly IBindable<int> indexInCurrentCombo = new Bindable<int>();
|
private readonly IBindable<int> indexInCurrentCombo = new Bindable<int>();
|
||||||
|
|
||||||
|
[Resolved]
|
||||||
|
private DrawableHitObject drawableObject { get; set; }
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(DrawableHitObject drawableObject)
|
private void load()
|
||||||
{
|
{
|
||||||
OsuHitObject osuObject = (OsuHitObject)drawableObject.HitObject;
|
var osuObject = (OsuHitObject)drawableObject.HitObject;
|
||||||
|
|
||||||
state.BindTo(drawableObject.State);
|
state.BindTo(drawableObject.State);
|
||||||
state.BindValueChanged(updateState, true);
|
state.BindValueChanged(updateState, true);
|
||||||
@ -64,32 +67,35 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
|
|||||||
|
|
||||||
private void updateState(ValueChangedEvent<ArmedState> state)
|
private void updateState(ValueChangedEvent<ArmedState> state)
|
||||||
{
|
{
|
||||||
glow.FadeOut(400);
|
using (BeginAbsoluteSequence(drawableObject.HitObject.StartTime + (drawableObject.Result?.TimeOffset ?? 0), true))
|
||||||
|
|
||||||
switch (state.NewValue)
|
|
||||||
{
|
{
|
||||||
case ArmedState.Hit:
|
glow.FadeOut(400);
|
||||||
const double flash_in = 40;
|
|
||||||
const double flash_out = 100;
|
|
||||||
|
|
||||||
flash.FadeTo(0.8f, flash_in)
|
switch (state.NewValue)
|
||||||
.Then()
|
{
|
||||||
.FadeOut(flash_out);
|
case ArmedState.Hit:
|
||||||
|
const double flash_in = 40;
|
||||||
|
const double flash_out = 100;
|
||||||
|
|
||||||
explode.FadeIn(flash_in);
|
flash.FadeTo(0.8f, flash_in)
|
||||||
this.ScaleTo(1.5f, 400, Easing.OutQuad);
|
.Then()
|
||||||
|
.FadeOut(flash_out);
|
||||||
|
|
||||||
using (BeginDelayedSequence(flash_in, true))
|
explode.FadeIn(flash_in);
|
||||||
{
|
this.ScaleTo(1.5f, 400, Easing.OutQuad);
|
||||||
// after the flash, we can hide some elements that were behind it
|
|
||||||
ring.FadeOut();
|
|
||||||
circle.FadeOut();
|
|
||||||
number.FadeOut();
|
|
||||||
|
|
||||||
this.FadeOut(800);
|
using (BeginDelayedSequence(flash_in, true))
|
||||||
}
|
{
|
||||||
|
// after the flash, we can hide some elements that were behind it
|
||||||
|
ring.FadeOut();
|
||||||
|
circle.FadeOut();
|
||||||
|
number.FadeOut();
|
||||||
|
|
||||||
break;
|
this.FadeOut(800);
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user