mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 18:42:56 +08:00
Merge pull request #5842 from iiSaLMaN/use-transform-state-management-for-catch
Use automatic state logic for catch ruleset
This commit is contained in:
commit
1237a63619
@ -58,14 +58,12 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawable
|
|||||||
ApplyResult(r => r.Type = CheckPosition.Invoke(HitObject) ? HitResult.Perfect : HitResult.Miss);
|
ApplyResult(r => r.Type = CheckPosition.Invoke(HitObject) ? HitResult.Perfect : HitResult.Miss);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override bool UseTransformStateManagement => false;
|
protected sealed override double InitialLifetimeOffset => HitObject.TimePreempt;
|
||||||
|
|
||||||
protected override void UpdateState(ArmedState state)
|
protected override void UpdateInitialTransforms() => this.FadeIn(200);
|
||||||
|
|
||||||
|
protected override void UpdateStateTransforms(ArmedState state)
|
||||||
{
|
{
|
||||||
// TODO: update to use new state management.
|
|
||||||
using (BeginAbsoluteSequence(HitObject.StartTime - HitObject.TimePreempt))
|
|
||||||
this.FadeIn(200);
|
|
||||||
|
|
||||||
var endTime = (HitObject as IHasEndTime)?.EndTime ?? HitObject.StartTime;
|
var endTime = (HitObject as IHasEndTime)?.EndTime ?? HitObject.StartTime;
|
||||||
|
|
||||||
using (BeginAbsoluteSequence(endTime, true))
|
using (BeginAbsoluteSequence(endTime, true))
|
||||||
|
@ -53,7 +53,7 @@ namespace osu.Game.Rulesets.Catch.UI
|
|||||||
if (lastPlateableFruit == null)
|
if (lastPlateableFruit == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// this is required to make this run after the last caught fruit runs UpdateState at least once.
|
// this is required to make this run after the last caught fruit runs updateState() at least once.
|
||||||
// TODO: find a better alternative
|
// TODO: find a better alternative
|
||||||
if (lastPlateableFruit.IsLoaded)
|
if (lastPlateableFruit.IsLoaded)
|
||||||
action();
|
action();
|
||||||
|
Loading…
Reference in New Issue
Block a user