Restore catcher state on revert judgement result

This commit is contained in:
ekrctb
2020-12-08 15:02:55 +09:00
parent 0213f77b4b
commit cb76a2d7b5
4 changed files with 62 additions and 9 deletions

View File

@ -14,6 +14,7 @@ using osu.Framework.Input.Bindings;
using osu.Framework.Utils;
using osu.Game.Beatmaps;
using osu.Game.Configuration;
using osu.Game.Rulesets.Catch.Judgements;
using osu.Game.Rulesets.Catch.Objects;
using osu.Game.Rulesets.Catch.Objects.Drawables;
using osu.Game.Rulesets.Catch.Skinning;
@ -210,6 +211,9 @@ namespace osu.Game.Rulesets.Catch.UI
public void OnNewResult(DrawableCatchHitObject drawableObject, JudgementResult result)
{
var catchResult = (CatchJudgementResult)result;
catchResult.CatcherAnimationState = CurrentState;
if (!(drawableObject.HitObject is PalpableCatchHitObject hitObject)) return;
if (result.IsHit)
@ -238,6 +242,8 @@ namespace osu.Game.Rulesets.Catch.UI
public void OnRevertResult(DrawableCatchHitObject fruit, JudgementResult result)
{
var catchResult = (CatchJudgementResult)result;
updateState(catchResult.CatcherAnimationState);
}
/// <summary>