1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-24 20:07:25 +08:00
osu-lazer/osu.iOS/AppDelegate.cs

26 lines
700 B
C#
Raw Normal View History

// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
2019-01-25 17:55:05 +08:00
// See the LICENCE file in the repository root for full licence text.
2018-12-29 17:35:37 +08:00
2019-07-24 20:49:35 +08:00
using System.Threading.Tasks;
2018-12-29 17:35:37 +08:00
using Foundation;
2018-12-06 19:00:23 +08:00
using osu.Framework.iOS;
using osu.Game;
2019-07-24 20:49:35 +08:00
using UIKit;
2018-12-06 15:19:09 +08:00
namespace osu.iOS
{
[Register("AppDelegate")]
2018-12-06 19:00:23 +08:00
public class AppDelegate : GameAppDelegate
2018-12-06 15:19:09 +08:00
{
2019-07-26 12:27:37 +08:00
private OsuGameIOS game;
2019-07-24 20:49:35 +08:00
2019-07-26 12:27:37 +08:00
protected override Framework.Game CreateGame() => game = new OsuGameIOS();
2019-07-24 20:49:35 +08:00
public override bool OpenUrl(UIApplication application, NSUrl url, string sourceApplication, NSObject annotation)
{
2019-07-26 12:27:37 +08:00
Task.Run(() => game.Import(url.Path));
2019-07-24 20:49:35 +08:00
return true;
}
2018-12-06 15:19:09 +08:00
}
}