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

Output gameplay clock progress in PlayerTestScenes

This commit is contained in:
Dean Herbert 2023-02-01 23:42:44 +09:00
parent baeae89c8c
commit a77baf8717

View File

@ -7,6 +7,7 @@ using System;
using System.Linq;
using JetBrains.Annotations;
using osu.Framework.Allocation;
using osu.Framework.Logging;
using osu.Framework.Testing;
using osu.Game.Configuration;
using osu.Game.Rulesets;
@ -25,6 +26,24 @@ namespace osu.Game.Tests.Visual
protected OsuConfigManager LocalConfig;
private double lastReportedTime;
protected override void Update()
{
base.Update();
if (Player?.GameplayClockContainer != null)
{
int roundedTime = (int)Player.GameplayClockContainer.CurrentTime / 1000;
if (roundedTime != lastReportedTime)
{
lastReportedTime = roundedTime;
Logger.Log($"⏱️ Gameplay clock reached {lastReportedTime * 1000:N0} ms");
}
}
}
[BackgroundDependencyLoader]
private void load()
{