1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-14 03:25:11 +08:00

Remove not needed stuff (+typo fix)

This commit is contained in:
ColdVolcano 2017-04-23 00:50:02 -05:00
parent 094a0f9639
commit fe35d20def
2 changed files with 4 additions and 13 deletions

View File

@ -1,18 +1,14 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.Threading.Tasks;
using osu.Framework.Allocation;
using osu.Framework.Audio;
using osu.Framework.Audio.Sample;
using osu.Framework.Audio.Track;
using osu.Framework.Configuration;
using osu.Framework.MathUtils;
using osu.Framework.Screens;
using osu.Framework.Graphics;
using osu.Game.Beatmaps;
using osu.Game.Configuration;
using osu.Game.Database;
using osu.Game.Graphics.Containers;
using osu.Game.Screens.Backgrounds;
using OpenTK.Graphics;
@ -64,13 +60,9 @@ namespace osu.Game.Screens.Menu
private Bindable<bool> menuVoice;
private Bindable<bool> menuMusic;
private TrackManager trackManager;
private BeatmapInfo beatmap;
private WorkingBeatmap song;
private int choosableBeatmapsetAmmout;
[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);
menuMusic = config.GetBindable<bool>(OsuConfig.MenuMusic);

View File

@ -65,7 +65,6 @@ namespace osu.Game.Screens.Menu
private TrackManager trackManager;
private BeatmapInfo beatmap;
private WorkingBeatmap song;
private int choosableBeatmapsetAmmout;
[BackgroundDependencyLoader]
private void load(OsuGame game, OsuConfigManager config, BeatmapDatabase beatmaps)
@ -76,10 +75,10 @@ namespace osu.Game.Screens.Menu
if (!menuMusic)
{
trackManager = game.Audio.Track;
choosableBeatmapsetAmmout = beatmaps.Query<BeatmapSetInfo>().Count();
if (choosableBeatmapsetAmmout > 0)
int choosableBeatmapsetAmmount = beatmaps.Query<BeatmapSetInfo>().Count();
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);
Beatmap = song;
}