Get the game running, though not perfectly

This commit is contained in:
Drew DeVault
2016-11-08 18:46:08 -05:00
parent ee24cd310c
commit fe9034323b
4 changed files with 17 additions and 23 deletions

View File

@ -26,12 +26,6 @@ namespace osu.Desktop.VisualTests.Tests
protected override IFrameBasedClock Clock => localClock;
[Initializer]
private void Load()
{
// TODO: Do we even need this here?
}
public override void Reset()
{
base.Reset();

View File

@ -52,7 +52,7 @@ namespace osu.Game.Beatmaps.Formats
foreach (HitObject h in b.HitObjects)
{
if (h.NewCombo) i = (i + 1) % colours.Count;
if (h.NewCombo || i == -1) i = (i + 1) % colours.Count;
h.Colour = colours[i];
}
}

View File

@ -37,18 +37,6 @@ namespace osu.Game
public readonly Bindable<WorkingBeatmap> Beatmap = new Bindable<WorkingBeatmap>();
public OsuGameBase()
{
AddInternal(ratioContainer = new RatioAdjust());
Children = new Drawable[]
{
Cursor = new OsuCursorContainer { Depth = float.MaxValue }
};
Beatmap.ValueChanged += Beatmap_ValueChanged;
}
private void Beatmap_ValueChanged(object sender, EventArgs e)
{
}
@ -57,9 +45,21 @@ namespace osu.Game
private void Load()
{
Dependencies.Cache(this);
Dependencies.Cache<OsuConfigManager>();
Dependencies.Cache<OsuConfigManager>(new OsuConfigManager(Host.Storage));
Dependencies.Cache(new BeatmapDatabase(Host.Storage, Host));
AddInternal(ratioContainer = new RatioAdjust());
Children = new Drawable[]
{
Options = new OptionsOverlay(),
Cursor = new OsuCursorContainer { Depth = float.MaxValue }
};
Dependencies.Cache(Options);
Beatmap.ValueChanged += Beatmap_ValueChanged;
OszArchiveReader.Register();
//this completely overrides the framework default. will need to change once we make a proper FontStore.
@ -80,12 +80,12 @@ namespace osu.Game
Fonts.AddStore(new GlyphStore(Resources, @"Fonts/Exo2.0-Black"));
Fonts.AddStore(new GlyphStore(Resources, @"Fonts/Exo2.0-BlackItalic"));
API = new APIAccess()
Dependencies.Cache(API = new APIAccess
{
Username = Config.Get<string>(OsuConfig.Username),
Password = Config.Get<string>(OsuConfig.Password),
Token = Config.Get<string>(OsuConfig.Token)
};
});
}
public override void SetHost(BasicGameHost host)