Example #1
0
        public GameViewController(IOSGameView view, GameHost host)
        {
            View = view;

            gameView = view;
            gameHost = host;
        }
Example #2
0
        public IOSGameHost(IOSGameView gameView)
        {
            this.gameView = gameView;

            NSNotificationCenter.DefaultCenter.AddObserver(UIKeyboard.WillShowNotification, handleKeyboardNotification);
            NSNotificationCenter.DefaultCenter.AddObserver(UIKeyboard.DidHideNotification, handleKeyboardNotification);
        }
        public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
            aotImageSharp();

            Window = new UIWindow(UIScreen.MainScreen.Bounds);

            gameView = new IOSGameView(new RectangleF(0.0f, 0.0f, (float)Window.Frame.Size.Width, (float)Window.Frame.Size.Height));
            host     = new IOSGameHost(gameView);

            Window.RootViewController = new GameViewController(gameView, host);
            Window.MakeKeyAndVisible();

            // required to trigger the osuTK update loop, which is used for input handling.
            gameView.Run();

            host.Run(CreateGame());

            return(true);
        }
Example #4
0
        public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
            aotImageSharp();

            Window   = new UIWindow(UIScreen.MainScreen.Bounds);
            gameView = new IOSGameView(new RectangleF(0.0f, 0.0f, (float)Window.Frame.Size.Width, (float)Window.Frame.Size.Height));

            GameViewController viewController = new GameViewController
            {
                View = gameView
            };

            Window.RootViewController = viewController;
            Window.MakeKeyAndVisible();

            gameView.Run();

            host = new IOSGameHost(gameView);
            host.Run(CreateGame());

            return(true);
        }
Example #5
0
        public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
            aotImageSharp();

            Window = new UIWindow(UIScreen.MainScreen.Bounds);

            gameView = new IOSGameView(new RectangleF(0.0f, 0.0f, (float)Window.Frame.Size.Width, (float)Window.Frame.Size.Height));
            host     = new IOSGameHost(gameView);

            Window.RootViewController = new GameViewController(gameView, host);
            Window.MakeKeyAndVisible();

            // required to trigger the osuTK update loop, which is used for input handling.
            gameView.Run();

            host.Run(CreateGame());

            // Watch for the volume button changing in order to change audio policy
            AVAudioSession audioSession = AVAudioSession.SharedInstance();

            audioSession.AddObserver(this, output_volume, NSKeyValueObservingOptions.New, IntPtr.Zero);

            return(true);
        }
Example #6
0
 internal IOSClipboard(IOSGameView gameView)
 {
     this.gameView = gameView;
 }
Example #7
0
 public IOSGameHost(IOSGameView gameView)
 {
     this.gameView          = gameView;
     IOSGameWindow.GameView = gameView;
     Window = new IOSGameWindow();
 }
Example #8
0
 public IOSGameWindow([NotNull] IOSGameView gameView)
     : base(gameView)
 {
     this.gameView = gameView;
 }
 public IOSGameHost(IOSGameView gameView)
 {
     this.gameView = gameView;
 }