mirror of
https://github.com/ppy/osu
synced 2025-01-31 10:22:02 +00:00
Remove not needed stuff (+typo fix)
This commit is contained in:
parent
094a0f9639
commit
fe35d20def
@ -1,18 +1,14 @@
|
|||||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Audio;
|
using osu.Framework.Audio;
|
||||||
using osu.Framework.Audio.Sample;
|
using osu.Framework.Audio.Sample;
|
||||||
using osu.Framework.Audio.Track;
|
using osu.Framework.Audio.Track;
|
||||||
using osu.Framework.Configuration;
|
using osu.Framework.Configuration;
|
||||||
using osu.Framework.MathUtils;
|
|
||||||
using osu.Framework.Screens;
|
using osu.Framework.Screens;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Game.Beatmaps;
|
|
||||||
using osu.Game.Configuration;
|
using osu.Game.Configuration;
|
||||||
using osu.Game.Database;
|
|
||||||
using osu.Game.Graphics.Containers;
|
using osu.Game.Graphics.Containers;
|
||||||
using osu.Game.Screens.Backgrounds;
|
using osu.Game.Screens.Backgrounds;
|
||||||
using OpenTK.Graphics;
|
using OpenTK.Graphics;
|
||||||
@ -64,13 +60,9 @@ namespace osu.Game.Screens.Menu
|
|||||||
|
|
||||||
private Bindable<bool> menuVoice;
|
private Bindable<bool> menuVoice;
|
||||||
private Bindable<bool> menuMusic;
|
private Bindable<bool> menuMusic;
|
||||||
private TrackManager trackManager;
|
|
||||||
private BeatmapInfo beatmap;
|
|
||||||
private WorkingBeatmap song;
|
|
||||||
private int choosableBeatmapsetAmmout;
|
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuGameBase game, AudioManager audio, OsuConfigManager config, BeatmapDatabase beatmaps)
|
private void load(OsuGameBase game, AudioManager audio, OsuConfigManager config)
|
||||||
{
|
{
|
||||||
menuVoice = config.GetBindable<bool>(OsuConfig.MenuVoice);
|
menuVoice = config.GetBindable<bool>(OsuConfig.MenuVoice);
|
||||||
menuMusic = config.GetBindable<bool>(OsuConfig.MenuMusic);
|
menuMusic = config.GetBindable<bool>(OsuConfig.MenuMusic);
|
||||||
|
@ -65,7 +65,6 @@ namespace osu.Game.Screens.Menu
|
|||||||
private TrackManager trackManager;
|
private TrackManager trackManager;
|
||||||
private BeatmapInfo beatmap;
|
private BeatmapInfo beatmap;
|
||||||
private WorkingBeatmap song;
|
private WorkingBeatmap song;
|
||||||
private int choosableBeatmapsetAmmout;
|
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuGame game, OsuConfigManager config, BeatmapDatabase beatmaps)
|
private void load(OsuGame game, OsuConfigManager config, BeatmapDatabase beatmaps)
|
||||||
@ -76,10 +75,10 @@ namespace osu.Game.Screens.Menu
|
|||||||
if (!menuMusic)
|
if (!menuMusic)
|
||||||
{
|
{
|
||||||
trackManager = game.Audio.Track;
|
trackManager = game.Audio.Track;
|
||||||
choosableBeatmapsetAmmout = beatmaps.Query<BeatmapSetInfo>().Count();
|
int choosableBeatmapsetAmmount = beatmaps.Query<BeatmapSetInfo>().Count();
|
||||||
if (choosableBeatmapsetAmmout > 0)
|
if (choosableBeatmapsetAmmount > 0)
|
||||||
{
|
{
|
||||||
beatmap = beatmaps.GetWithChildren<BeatmapSetInfo>(RNG.Next(1, choosableBeatmapsetAmmout)).Beatmaps[0];
|
beatmap = beatmaps.GetWithChildren<BeatmapSetInfo>(RNG.Next(1, choosableBeatmapsetAmmount)).Beatmaps[0];
|
||||||
song = beatmaps.GetWorkingBeatmap(beatmap);
|
song = beatmaps.GetWorkingBeatmap(beatmap);
|
||||||
Beatmap = song;
|
Beatmap = song;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user