mirror of
https://github.com/osukey/osukey.git
synced 2025-08-07 00:23:59 +09:00
Use beatmap directly in ReadyButton
This commit is contained in:
@ -10,7 +10,6 @@ using osu.Game.Beatmaps;
|
|||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
using osu.Game.Online.Multiplayer;
|
using osu.Game.Online.Multiplayer;
|
||||||
using osu.Game.Overlays;
|
|
||||||
|
|
||||||
namespace osu.Game.Screens.Multi.Match.Components
|
namespace osu.Game.Screens.Multi.Match.Components
|
||||||
{
|
{
|
||||||
@ -27,9 +26,6 @@ namespace osu.Game.Screens.Multi.Match.Components
|
|||||||
[Resolved]
|
[Resolved]
|
||||||
private BeatmapManager beatmaps { get; set; }
|
private BeatmapManager beatmaps { get; set; }
|
||||||
|
|
||||||
[Resolved]
|
|
||||||
private MusicController musicController { get; set; }
|
|
||||||
|
|
||||||
private bool hasBeatmap;
|
private bool hasBeatmap;
|
||||||
|
|
||||||
public ReadyButton()
|
public ReadyButton()
|
||||||
@ -104,7 +100,7 @@ namespace osu.Game.Screens.Multi.Match.Components
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool hasEnoughTime = DateTimeOffset.UtcNow.AddSeconds(30).AddMilliseconds(musicController.CurrentTrack.Length) < endDate.Value;
|
bool hasEnoughTime = DateTimeOffset.UtcNow.AddSeconds(30).AddMilliseconds(gameBeatmap.Value.Track.Length) < endDate.Value;
|
||||||
|
|
||||||
Enabled.Value = hasBeatmap && hasEnoughTime;
|
Enabled.Value = hasBeatmap && hasEnoughTime;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user