1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 12:47:25 +08:00
osu-lazer/osu.Game/Rulesets/Judgements
Dean Herbert ee33f62809 Fix DrawableJudgement not always animating correctly on skin change
If the skin is changed before gameplay has started (at the loading
screen) it is possible for a sequence of events to occur which results
in the animation not being played:

- `SkinReloadableDrawable` runs its BDL load (and calls `OnSkinChanged`
  once)
- User changes skin, triggering `DrawableJudgement`'s skin change
  handling (binding directly on the `SkinSource` locally)
- This will call `PrepareDrawables` and reinitialise the
  `SkinnableDrawable` child hierarchy, then immediately apply the
animations to it.
- The new `SkinnableDrawable` will then get the `SkinChanged` event and
  schedule a handler for it, which will run on its first Update call.
- Any added animations will be lost as a result.

Fixed by binding directly to the `SkinnableDrawable`'s `OnSkinChanged`.
This has the added bonus of not needing to reinitialise the child
hierarchy on skin change (which felt a bit weird in the first place).
2020-11-24 15:23:53 +09:00
..
DefaultJudgementPiece.cs Don't show default judgements in front of objects for now 2020-11-20 16:30:58 +09:00
DrawableJudgement.cs Fix DrawableJudgement not always animating correctly on skin change 2020-11-24 15:23:53 +09:00
IAnimatableJudgement.cs Move CanBeNull specification to the interface 2020-11-20 16:30:48 +09:00
IgnoreJudgement.cs Fix a few missed judgements 2020-09-29 16:33:38 +09:00
Judgement.cs Adjust health increase values to match old ones better 2020-10-03 12:16:22 +02:00
JudgementResult.cs Add new method handling hit state specifically 2020-11-04 16:13:14 +09:00