1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 04:13:00 +08:00

Update inline with framework

This commit is contained in:
EVAST9919 2017-10-02 08:51:00 +03:00
parent c2f487aa3e
commit 7052462863
2 changed files with 3 additions and 10 deletions

@ -1 +1 @@
Subproject commit 9d142a8e009794dfee828392e36025d08577131d Subproject commit 5f19dd913dfc69013a3b9cf30ccfd9c44881a321

View File

@ -5,7 +5,6 @@ using OpenTK;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Threading;
using osu.Game.Beatmaps.Timing; using osu.Game.Beatmaps.Timing;
using osu.Game.Rulesets.Scoring; using osu.Game.Rulesets.Scoring;
using System.Collections.Generic; using System.Collections.Generic;
@ -32,8 +31,6 @@ namespace osu.Game.Screens.Play.BreaksOverlay
} }
} }
private readonly List<ScheduledDelegate> tasks = new List<ScheduledDelegate>();
private readonly bool letterboxing; private readonly bool letterboxing;
private readonly LetterboxOverlay letterboxOverlay; private readonly LetterboxOverlay letterboxOverlay;
private readonly Container remainingTimeBox; private readonly Container remainingTimeBox;
@ -92,10 +89,7 @@ namespace osu.Game.Screens.Play.BreaksOverlay
private void initializeBreaks() private void initializeBreaks()
{ {
FinishTransforms(true); FinishTransforms(true);
Scheduler.CancelDelayedTasks();
foreach (var t in tasks)
t.Cancel();
tasks.Clear();
if (breaks == null) if (breaks == null)
return; return;
@ -125,8 +119,7 @@ namespace osu.Game.Screens.Play.BreaksOverlay
.Then() .Then()
.ResizeWidthTo(0, b.Duration - fade_duration); .ResizeWidthTo(0, b.Duration - fade_duration);
tasks.Add(new ScheduledDelegate(() => remainingTimeCounter.StartCounting(b.EndTime), b.StartTime)); Scheduler.AddDelayed(() => remainingTimeCounter.StartCounting(b.EndTime), b.StartTime - Clock.CurrentTime);
Scheduler.Add(tasks[tasks.Count - 1]);
remainingTimeCounter.FadeIn(fade_duration); remainingTimeCounter.FadeIn(fade_duration);