1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-15 03:23:02 +08:00

Cache self rather than GameplayClock

This commit is contained in:
Dean Herbert 2022-08-15 18:14:57 +09:00
parent c5f8529d20
commit cc982d374c

View File

@ -86,7 +86,9 @@ namespace osu.Game.Screens.Play
{ {
var dependencies = new DependencyContainer(base.CreateChildDependencies(parent)); var dependencies = new DependencyContainer(base.CreateChildDependencies(parent));
dependencies.CacheAs<IGameplayClock>(GameplayClock = CreateGameplayClock(AdjustableSource)); GameplayClock = CreateGameplayClock(AdjustableSource);
dependencies.CacheAs<IGameplayClock>(this);
GameplayClock.StartTime = StartTime; GameplayClock.StartTime = StartTime;
GameplayClock.IsPaused.BindTo(isPaused); GameplayClock.IsPaused.BindTo(isPaused);