mirror of
https://github.com/ppy/osu.git
synced 2025-02-05 18:35:26 +08:00
Move public members up
This commit is contained in:
parent
fe6b1936cb
commit
ce96c58230
@ -160,6 +160,36 @@ namespace osu.Game
|
|||||||
Name = @"osu!lazer";
|
Name = @"osu!lazer";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void SetHost(GameHost host)
|
||||||
|
{
|
||||||
|
base.SetHost(host);
|
||||||
|
|
||||||
|
// may be non-null for certain tests
|
||||||
|
Storage ??= host.Storage;
|
||||||
|
|
||||||
|
LocalConfig ??= UseDevelopmentServer
|
||||||
|
? new DevelopmentOsuConfigManager(Storage)
|
||||||
|
: new OsuConfigManager(Storage);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Use to programatically exit the game as if the user was triggering via alt-f4.
|
||||||
|
/// Will keep persisting until an exit occurs (exit may be blocked multiple times).
|
||||||
|
/// </summary>
|
||||||
|
public void GracefullyExit()
|
||||||
|
{
|
||||||
|
if (!OnExiting())
|
||||||
|
Exit();
|
||||||
|
else
|
||||||
|
Scheduler.AddDelayed(GracefullyExit, 2000);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Migrate(string path)
|
||||||
|
{
|
||||||
|
contextFactory.FlushConnections();
|
||||||
|
(Storage as OsuStorage)?.Migrate(Host.GetStorage(path));
|
||||||
|
}
|
||||||
|
|
||||||
protected override UserInputManager CreateUserInputManager() => new OsuUserInputManager();
|
protected override UserInputManager CreateUserInputManager() => new OsuUserInputManager();
|
||||||
|
|
||||||
protected virtual BatteryInfo CreateBatteryInfo() => null;
|
protected virtual BatteryInfo CreateBatteryInfo() => null;
|
||||||
@ -169,6 +199,8 @@ namespace osu.Game
|
|||||||
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent) =>
|
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent) =>
|
||||||
dependencies = new DependencyContainer(base.CreateChildDependencies(parent));
|
dependencies = new DependencyContainer(base.CreateChildDependencies(parent));
|
||||||
|
|
||||||
|
protected override Storage CreateStorage(GameHost host, Storage defaultStorage) => new OsuStorage(host, defaultStorage);
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load()
|
private void load()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user