Introduce dependency injection

This commit is contained in:
Drew DeVault
2016-11-04 18:06:58 -04:00
parent 788c11de10
commit 19fd6fe249
5 changed files with 17 additions and 11 deletions

View File

@ -19,6 +19,7 @@ using osu.Game.Input;
using OpenTK.Input;
using osu.Framework.Logging;
using osu.Game.Graphics.UserInterface.Volume;
using osu.Game.Database;
namespace osu.Game
{
@ -61,7 +62,7 @@ namespace osu.Game
base.Load(game);
if (args?.Length > 0)
Schedule(delegate { Beatmaps.Import(args); });
Schedule(delegate { Dependencies.Get<BeatmapDatabase>().Import(args); });
//attach our bindables to the audio subsystem.
Audio.Volume.Weld(Config.GetBindable<double>(OsuConfig.VolumeUniversal));