1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 09:07:25 +08:00

Update osu! drawables to use TransformSequences.

This commit is contained in:
Dean Herbert 2017-04-27 17:37:38 +09:00
parent 5e76f02b4f
commit 4ab636cbb8
5 changed files with 16 additions and 18 deletions

View File

@ -104,10 +104,8 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
ApproachCircle.ScaleTo(1.1f, TIME_PREEMPT);
}
protected override void UpdateState(ArmedState state)
protected override void UpdateCurrentState(ArmedState state)
{
base.UpdateState(state);
ApproachCircle.FadeOut();
double endTime = (HitObject as IHasEndTime)?.EndTime ?? HitObject.StartTime;

View File

@ -21,17 +21,23 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
protected override OsuJudgement CreateJudgement() => new OsuJudgement { MaxScore = OsuScoreResult.Hit300 };
protected override void UpdateState(ArmedState state)
protected override sealed void UpdateState(ArmedState state)
{
Flush();
UpdateInitialState();
Delay(HitObject.StartTime - Time.Current - TIME_PREEMPT + Judgement.TimeOffset, true);
using (BeginAbsoluteSequence(HitObject.StartTime - TIME_PREEMPT, true))
{
UpdatePreemptState();
UpdatePreemptState();
using (BeginDelayedSequence(TIME_PREEMPT + Judgement.TimeOffset, true))
UpdateCurrentState(state);
}
}
Delay(TIME_PREEMPT, true);
protected virtual void UpdateCurrentState(ArmedState state)
{
}
protected virtual void UpdatePreemptState()

View File

@ -158,10 +158,8 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
ball.Alpha = 0;
}
protected override void UpdateState(ArmedState state)
protected override void UpdateCurrentState(ArmedState state)
{
base.UpdateState(state);
ball.FadeIn();
Delay(slider.Duration, true);

View File

@ -72,10 +72,8 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
Delay(-animIn);
}
protected override void UpdateState(ArmedState state)
protected override void UpdateCurrentState(ArmedState state)
{
base.UpdateState(state);
switch (state)
{
case ArmedState.Idle:

View File

@ -132,10 +132,8 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
disc.FadeIn(200);
}
protected override void UpdateState(ArmedState state)
protected override void UpdateCurrentState(ArmedState state)
{
base.UpdateState(state);
Delay(spinner.Duration, true);
FadeOut(160);