示例#1
0
        protected override void Initialize()
        {
            #if IOS
            var bounds       = UIKit.UIScreen.MainScreen.Bounds;
            var nativeScale  = UIKit.UIScreen.MainScreen.Scale;
            var screenWidth  = (int)(bounds.Width * nativeScale);
            var screenHeight = (int)(bounds.Height * nativeScale);
            graphics.PreferredBackBufferWidth  = screenWidth;
            graphics.PreferredBackBufferHeight = screenHeight;
            #endif

            IsMouseVisible = true;

            FlatRedBallServices.InitializeFlatRedBall(this, graphics);
            FlatRedBallServices.GraphicsOptions.TextureFilter = TextureFilter.Point;

            CameraSetup.SetupCamera(SpriteManager.Camera, graphics);
            GlobalContent.Initialize();
            FlatRedBall.Screens.ScreenManager.Start(typeof(TownRaiser.Screens.MainMenu));

            //Setup a custom
            CustomCursorGraphicController.Initialize(this);

            base.Initialize();
        }
示例#2
0
        protected override void Initialize()
        {
            #if IOS
            var bounds       = UIKit.UIScreen.MainScreen.Bounds;
            var nativeScale  = UIKit.UIScreen.MainScreen.Scale;
            var screenWidth  = (int)(bounds.Width * nativeScale);
            var screenHeight = (int)(bounds.Height * nativeScale);
            graphics.PreferredBackBufferWidth  = screenWidth;
            graphics.PreferredBackBufferHeight = screenHeight;
            #endif

            FlatRedBallServices.InitializeFlatRedBall(this, graphics);

            GlobalContent.Initialize();
            CameraSetup.SetupCamera(SpriteManager.Camera, graphics);
            FlatRedBall.Screens.ScreenManager.Start(typeof(Shiprekt.Screens.MainMenu));
            //FlatRedBall.Screens.ScreenManager.Start(typeof(Shiprekt.Screens.TestScreen));

            FlatRedBallServices.GraphicsOptions.TextureFilter = TextureFilter.Point;

            Camera.Main.BackgroundColor = Color.Black;

            //glueControlManager = new GlueControlManager(8021);
            //glueControlManager.Start();

            base.Initialize();
        }
示例#3
0
        protected override void Initialize()
        {
            // Create a timer that will simulate the gameloop
            _timer          = new DispatcherTimer();
            _timer.Interval = TimeSpan.FromSeconds(1 / 60);
            _timer.Tick    += TimerTick;
            _timer.Start();

            // Create the graphics options and initialize FRB with them
            var graphicsOptions = new GraphicsOptions(this, Graphics);

            graphicsOptions.SuspendDeviceReset();
            graphicsOptions.ResolutionWidth  = RenderWidth;
            graphicsOptions.ResolutionHeight = RenderHeight;
            graphicsOptions.ResumeDeviceReset();
            FlatRedBallServices.InitializeFlatRedBall(this, Graphics, graphicsOptions);
            FlatRedBall.Screens.ScreenManager.Start(typeof(FlatRedBallWpf.Screens.MainScreen));

            if (false)
            {
                // Don't run this because we want the game's camera setup to run
                // Put if(false) so that it doesn't get re-generated
                CameraSetup.SetupCamera(SpriteManager.Camera, this.Graphics);
            }
            GlobalContent.Initialize();
            Mouse.ModifyMouseState += HandleModifyMouseState;

            FlatRedBall.Gui.GuiManager.Cursor.CustomIsActive = HandleCustomIsActive;

            base.Initialize();
        }
示例#4
0
        protected override void Initialize()
        {
#if IOS
            var bounds       = UIKit.UIScreen.MainScreen.Bounds;
            var nativeScale  = UIKit.UIScreen.MainScreen.Scale;
            var screenWidth  = (int)(bounds.Width * nativeScale);
            var screenHeight = (int)(bounds.Height * nativeScale);
            graphics.PreferredBackBufferWidth  = screenWidth;
            graphics.PreferredBackBufferHeight = screenHeight;
#endif

            FlatRedBallServices.InitializeFlatRedBall(this, graphics);

            FlatRedBallServices.GraphicsOptions.TextureFilter = TextureFilter.Point;

            CameraSetup.SetupCamera(SpriteManager.Camera, graphics);

            GlobalContent.Initialize();

            GameSpecificInitialization();


            FlatRedBall.Screens.ScreenManager.Start(typeof(TileAdventure.Screens.GameScreen));

            base.Initialize();
        }
示例#5
0
        protected override void Initialize()
        {
            Renderer.UseRenderTargets = false;
            FlatRedBallServices.InitializeFlatRedBall(this, graphics);
            GlobalContent.Initialize();
            CameraSetup.SetupCamera(SpriteManager.Camera, graphics);

            FlatRedBall.Screens.ScreenManager.Start(typeof(DemoProject.Screens.TutorialScreen));

            base.Initialize();
        }
示例#6
0
        protected override void Initialize()
        {
            Renderer.UseRenderTargets = false;
            FlatRedBallServices.InitializeFlatRedBall(this, graphics);
            GlobalContent.Initialize();
            CameraSetup.SetupCamera(SpriteManager.Camera, graphics);

            Screens.ScreenManager.Start(typeof(PlatformerSample.Screens.GameScreen).FullName);

            base.Initialize();
        }
示例#7
0
        protected override void Initialize()
        {
            FlatRedBallServices.InitializeFlatRedBall(this, graphics);
            CameraSetup.SetupCamera(SpriteManager.Camera, graphics);
            CustomPreGlobalContentInitialize();
            GlobalContent.Initialize();

            LocalizationManager.CurrentLanguage = 1;

            CustomInitialize();

            FlatRedBall.Screens.ScreenManager.Start(typeof(GlueTestProject.Screens.FirstScreen));

            base.Initialize();
        }
示例#8
0
        protected override void Initialize()
        {
            #if IOS
            var bounds       = UIKit.UIScreen.MainScreen.Bounds;
            var nativeScale  = UIKit.UIScreen.MainScreen.Scale;
            var screenWidth  = (int)(bounds.Width * nativeScale);
            var screenHeight = (int)(bounds.Height * nativeScale);
            graphics.PreferredBackBufferWidth  = screenWidth;
            graphics.PreferredBackBufferHeight = screenHeight;
            #endif

            FlatRedBallServices.InitializeFlatRedBall(this, graphics);

            GlobalContent.Initialize();
            CameraSetup.SetupCamera(SpriteManager.Camera, graphics);
            FlatRedBall.Screens.ScreenManager.Start(typeof(SpaceGame.Screens.StartMenu));

            base.Initialize();


            //Template to create empty save
            save1.Data.m1p1_2 = false;
            save1.Data.m1p1_3 = false;
            save1.Data.m1p3_4 = false;
            save1.Data.m1p3_5 = false;
            save1.Data.m1p5_6 = false;
            save1.Data.m1p2_6 = false;

            save2.Data.m1p1_2 = false;
            save2.Data.m1p1_3 = false;
            save2.Data.m1p3_4 = false;
            save2.Data.m1p3_5 = false;
            save2.Data.m1p5_6 = false;
            save2.Data.m1p2_6 = false;

            save2.Data.m1p1_2 = false;
            save2.Data.m1p1_3 = false;
            save2.Data.m1p3_4 = false;
            save2.Data.m1p3_5 = false;
            save2.Data.m1p5_6 = false;
            save2.Data.m1p2_6 = false;

            save1.Load();
            save2.Load();
            save3.Load();
        }
示例#9
0
        protected override void Initialize()
        {
            #if IOS
            var bounds       = UIKit.UIScreen.MainScreen.Bounds;
            var nativeScale  = UIKit.UIScreen.MainScreen.Scale;
            var screenWidth  = (int)(bounds.Width * nativeScale);
            var screenHeight = (int)(bounds.Height * nativeScale);
            graphics.PreferredBackBufferWidth  = screenWidth;
            graphics.PreferredBackBufferHeight = screenHeight;
            #endif

            FlatRedBallServices.InitializeFlatRedBall(this, graphics);

            GlobalContent.Initialize();
            FlatRedBallServices.GraphicsOptions.TextureFilter = TextureFilter.Point;
            CameraSetup.SetupCamera(SpriteManager.Camera, graphics);
            Type startScreenType = typeof(FishStory.Screens.TitleScreen);

            var commandLineArgs = Environment.GetCommandLineArgs();
            if (commandLineArgs.Length > 0)
            {
                var thisAssembly = this.GetType().Assembly;
                // see if any of these are screens:
                foreach (var item in commandLineArgs)
                {
                    var type = thisAssembly.GetType(item);

                    if (type != null)
                    {
                        startScreenType = type;
                        break;
                    }
                }
            }

            if (startScreenType != null)
            {
                FlatRedBall.Screens.ScreenManager.Start(startScreenType);
            }

            GeneratedInitialize();

            base.Initialize();
        }
示例#10
0
        protected override void Initialize()
        {
            #if IOS
            var bounds       = UIKit.UIScreen.MainScreen.Bounds;
            var nativeScale  = UIKit.UIScreen.MainScreen.Scale;
            var screenWidth  = (int)(bounds.Width * nativeScale);
            var screenHeight = (int)(bounds.Height * nativeScale);
            graphics.PreferredBackBufferWidth  = screenWidth;
            graphics.PreferredBackBufferHeight = screenHeight;
            #endif

            FlatRedBallServices.InitializeFlatRedBall(this, graphics);

            CameraSetup.SetupCamera(SpriteManager.Camera, graphics);
            GlobalContent.Initialize();
            FlatRedBall.Screens.ScreenManager.Start(typeof(GlueView2.Screens.MainScreen));

            base.Initialize();
        }
示例#11
0
        protected override void Initialize()
        {
                        #if IOS
            var bounds       = UIKit.UIScreen.MainScreen.Bounds;
            var nativeScale  = UIKit.UIScreen.MainScreen.Scale;
            var screenWidth  = (int)(bounds.Width * nativeScale);
            var screenHeight = (int)(bounds.Height * nativeScale);
            graphics.PreferredBackBufferWidth  = screenWidth;
            graphics.PreferredBackBufferHeight = screenHeight;
                        #endif

            FlatRedBallServices.InitializeFlatRedBall(this, graphics);

            IsMouseVisible           = true;
            Window.AllowUserResizing = true;

            CameraSetup.SetupCamera(SpriteManager.Camera, graphics);
            GlobalContent.Initialize();
            FlatRedBall.Screens.ScreenManager.Start(typeof(BrakeNeck.Screens.MainMenu));

            base.Initialize();
        }
示例#12
0
        protected override void Initialize()
        {
#if IOS
            var bounds       = UIKit.UIScreen.MainScreen.Bounds;
            var nativeScale  = UIKit.UIScreen.MainScreen.Scale;
            var screenWidth  = (int)(bounds.Width * nativeScale);
            var screenHeight = (int)(bounds.Height * nativeScale);
            graphics.PreferredBackBufferWidth  = screenWidth;
            graphics.PreferredBackBufferHeight = screenHeight;
#endif


            FlatRedBallServices.InitializeFlatRedBall(this, graphics);
            FlatRedBallServices.GraphicsOptions.TextureFilter = TextureFilter.Point;
            SpriteManager.OrderedSortType = SortType.ZSecondaryParentY;

            CameraSetup.SetupCamera(SpriteManager.Camera, graphics);
            GlobalContent.Initialize();
            FlatRedBall.Screens.ScreenManager.Start(typeof(Teotihuacan.Screens.Level1));

            base.Initialize();
        }