Skip to content

Commit

Permalink
Start a random map on launch (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
mempler authored Nov 2, 2021
1 parent 288da61 commit ff03c51
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ private void Load(UpdaterOverlay updaterOverlay, AudioManager audioManager, Qsor
Origin = Anchor.Centre,
FillMode = FillMode.Fill,
});
AddInternal(parallaxBack);

_workingBeatmap.BindTo(beatmapManager.WorkingBeatmap);
_workingBeatmap.ValueChanged += e =>
Expand Down Expand Up @@ -87,15 +86,22 @@ private void Load(UpdaterOverlay updaterOverlay, AudioManager audioManager, Qsor
Scale = new Vector2(1f) * (DrawSize.X / DrawSize.Y)
}
});

AddInternal(parallaxFront);

AddInternal(_sideFlashes = new DrawableMenuSideFlashes());

AddInternal(_toolbar = new Toolbar());
AddInternal(_bottomBar = new BottomBar());

AddInternal(updaterOverlay);
InternalChildren = new Drawable[]
{
parallaxBack,
parallaxFront,

_sideFlashes = new DrawableMenuSideFlashes(),
_toolbar = new Toolbar(),
_bottomBar = new BottomBar(),

updaterOverlay
};

// Start a random map, TODO: remove this from here
beatmapManager.NextRandomMap();
beatmapManager.WorkingBeatmap.Value?.Play();
}

public override void OnEntering(IScreen last)
Expand Down
2 changes: 1 addition & 1 deletion Qsor.Game/QsorGame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ private void Load()

AddInternal(_keyBindingInputHandler = new GlobalKeyBindingInputHandler(this));


if (!DebugUtils.IsDebugBuild)
{
PushScreen(new IntroScreen());
Expand All @@ -42,7 +43,6 @@ private void Load()
}
}


protected override bool OnKeyDown(KeyDownEvent e)
{
switch (e.Key)
Expand Down

0 comments on commit ff03c51

Please sign in to comment.