public iOSGamePlatform(Game game) :
            base(game)
        {
            game.Services.AddService(typeof(iOSGamePlatform), this);

            // Setup our OpenALSoundController to handle our SoundBuffer pools
            soundControllerInstance = OpenALSoundController.GetInstance;

            //This also runs the TitleContainer static constructor, ensuring it is done on the main thread
            Directory.SetCurrentDirectory(TitleContainer.Location);

            _applicationObservers = new List <NSObject>();

            #if !TVOS
            UIApplication.SharedApplication.SetStatusBarHidden(true, UIStatusBarAnimation.Fade);
            #endif

            // Create a full-screen window
            _mainWindow = new UIWindow(UIScreen.MainScreen.Bounds);
            //_mainWindow.AutoresizingMask = UIViewAutoresizing.FlexibleDimensions;

            game.Services.AddService(typeof(UIWindow), _mainWindow);

            _viewController = new iOSGameViewController(this);
            game.Services.AddService(typeof(UIViewController), _viewController);
            Window = new iOSGameWindow(_viewController);

            _mainWindow.Add(_viewController.View);

            _viewController.InterfaceOrientationChanged += ViewController_InterfaceOrientationChanged;

            //(SJ) Why is this called here when it's not in any other project
            //Guide.Initialise(game);
        }
示例#2
0
        public iOSGamePlatform(Game game) :
            base(game)
        {
            game.Services.AddService(typeof(iOSGamePlatform), this);

            // Setup our OpenALSoundController to handle our SoundBuffer pools
            soundControllerInstance = OpenALSoundController.GetInstance;

            Directory.SetCurrentDirectory(NSBundle.MainBundle.ResourcePath);

            _applicationObservers = new List <NSObject>();

            UIApplication.SharedApplication.SetStatusBarHidden(true, UIStatusBarAnimation.Fade);

            // Create a full-screen window
            _mainWindow = new UIWindow(UIScreen.MainScreen.Bounds);
            //_mainWindow.AutoresizingMask = UIViewAutoresizing.FlexibleDimensions;

            game.Services.AddService(typeof(UIWindow), _mainWindow);

            _viewController = new iOSGameViewController(this);
            game.Services.AddService(typeof(UIViewController), _viewController);
            Window = new iOSGameWindow(_viewController);

            _mainWindow.RootViewController = _viewController;
            _mainWindow.Add(_viewController.View);

            _viewController.InterfaceOrientationChanged += ViewController_InterfaceOrientationChanged;

            Guide.Initialise(game);
        }
示例#3
0
        public iOSGamePlatform(Game game) : base(game)
        {
            game.Services.AddService(typeof(iOSGamePlatform), this);

            // Setup our OpenALSoundController to handle our SoundBuffer pools
            soundControllerInstance = OpenALSoundController.GetInstance;

            //This also runs the TitleContainer static constructor, ensuring it is done on the main thread
            Directory.SetCurrentDirectory(TitleContainer.Location);

            _applicationObservers = new List <NSObject> ();

            UIApplication.SharedApplication.SetStatusBarHidden(true, UIStatusBarAnimation.Fade);

            #region Modification 23-06-2014
            // Move view controller creation before Window creation
            // Create our viewcontroller first, it will have a reference to the AspyCores service lib/obj
            _viewController = new iOSGameViewController(this);
            game.Services.AddService(typeof(AspyViewController), _viewController);

            // Create a full-screen window
            // AspyMod - Not needed as we will already have a window object instanced and ready to rock
            //_mainWindow = new UIWindow (UIScreen.MainScreen.Bounds);

            //_mainWindow.AutoresizingMask = UIViewAutoresizing.FlexibleDimensions;

            //game.Services.AddService (typeof(AspyWindow), _mainWindow);
            game.Services.AddService(typeof(AspyWindow), _viewController.iOSGlobals.G__MainWindow);

            Window = new iOSGameWindow(_viewController);

            //_mainWindow.RootViewController = _viewController;
            //_mainWindow.Add (_viewController.View);

            // AspyCore handles orientation??
            // During any screen rotations check this if monogame swaps itself.
            _viewController.InterfaceOrientationChanged += ViewController_InterfaceOrientationChanged;

            #endregion

            //(SJ) Why is this called here when it's not in any other project
            //Guide.Initialise(game);
        }
示例#4
0
        public iOSGamePlatform(Game game) :
            base(game)
        {
            game.Services.AddService(typeof(iOSGamePlatform), this);
			
			// Setup our OpenALSoundController to handle our SoundBuffer pools
			soundControllerInstance = OpenALSoundController.GetInstance;
			
            Directory.SetCurrentDirectory(NSBundle.MainBundle.ResourcePath);

            _applicationObservers = new List<NSObject>();

            UIApplication.SharedApplication.SetStatusBarHidden(true, UIStatusBarAnimation.Fade);

            // Create a full-screen window
            _mainWindow = new UIWindow (UIScreen.MainScreen.Bounds);
			//_mainWindow.AutoresizingMask = UIViewAutoresizing.FlexibleDimensions;
			
            game.Services.AddService (typeof(UIWindow), _mainWindow);

            _viewController = new iOSGameViewController(this);
            game.Services.AddService (typeof(UIViewController), _viewController);
            Window = new iOSGameWindow (_viewController);

            _mainWindow.RootViewController = _viewController;
            _mainWindow.Add (_viewController.View);

            _viewController.InterfaceOrientationChanged += ViewController_InterfaceOrientationChanged;

            Guide.Initialise(game);
        }
示例#5
0
        public iOSGamePlatform(Game game) :
            base(game)
        {
            game.Services.AddService(typeof(iOSGamePlatform), this);
			
			// Setup our OpenALSoundController to handle our SoundBuffer pools
			soundControllerInstance = OpenALSoundController.GetInstance;

            //This also runs the TitleContainer static constructor, ensuring it is done on the main thread
            Directory.SetCurrentDirectory(TitleContainer.Location);

            _applicationObservers = new List<NSObject>();

            UIApplication.SharedApplication.SetStatusBarHidden(true, UIStatusBarAnimation.Fade);

            // Create a full-screen window
            _mainWindow = new UIWindow (UIScreen.MainScreen.Bounds);
			//_mainWindow.AutoresizingMask = UIViewAutoresizing.FlexibleDimensions;
			
            game.Services.AddService (typeof(UIWindow), _mainWindow);

            _viewController = new iOSGameViewController(this);
            game.Services.AddService (typeof(UIViewController), _viewController);
            Window = new iOSGameWindow (_viewController);

            _mainWindow.RootViewController = _viewController;
            _mainWindow.Add (_viewController.View);

            _viewController.InterfaceOrientationChanged += ViewController_InterfaceOrientationChanged;

            //(SJ) Why is this called here when it's not in any other project
            //Guide.Initialise(game);
        }