1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 11:37:28 +08:00

Merge pull request #10676 from peppy/fix-hitcircle-glow-on-skin-change

Fix skin changes resulting in incorrectly applied transforms in MainCirclePiece
This commit is contained in:
Dan Balasescu 2020-11-06 21:09:22 +09:00 committed by GitHub
commit cf9acca78a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 52 additions and 40 deletions

View File

@ -42,8 +42,11 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
private readonly IBindable<Color4> accentColour = new Bindable<Color4>();
private readonly IBindable<int> indexInCurrentCombo = new Bindable<int>();
[Resolved]
private DrawableHitObject drawableObject { get; set; }
[BackgroundDependencyLoader]
private void load(DrawableHitObject drawableObject)
private void load()
{
var drawableOsuObject = (DrawableOsuHitObject)drawableObject;
@ -63,6 +66,8 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
}
private void updateState(ValueChangedEvent<ArmedState> state)
{
using (BeginAbsoluteSequence(drawableObject.HitStateUpdateTime, true))
{
glow.FadeOut(400);
@ -94,3 +99,4 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
}
}
}
}

View File

@ -42,11 +42,14 @@ namespace osu.Game.Rulesets.Osu.Skinning
private readonly Bindable<Color4> accentColour = new Bindable<Color4>();
private readonly IBindable<int> indexInCurrentCombo = new Bindable<int>();
[Resolved]
private DrawableHitObject drawableObject { get; set; }
[Resolved]
private ISkinSource skin { get; set; }
[BackgroundDependencyLoader]
private void load(DrawableHitObject drawableObject)
private void load()
{
var drawableOsuObject = (DrawableOsuHitObject)drawableObject;
@ -144,6 +147,8 @@ namespace osu.Game.Rulesets.Osu.Skinning
{
const double legacy_fade_duration = 240;
using (BeginAbsoluteSequence(drawableObject.HitStateUpdateTime, true))
{
switch (state.NewValue)
{
case ArmedState.Hit:
@ -170,3 +175,4 @@ namespace osu.Game.Rulesets.Osu.Skinning
}
}
}
}