Пример #1
0
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            FlatRedBallServices.InitializeFlatRedBall(this, graphics);

            this.TargetElapsedTime = TimeSpan.FromSeconds( 1 / 30.0 );

            mToolForm = new ToolForm();
            mToolForm.Owner = (Form)(Form.FromHandle(FlatRedBallServices.WindowHandle));
            Plugin.PluginManager.Initialize();

            IsMouseVisible = true;

            IsFixedTimeStep = false;

            GuiData.Initialize();

            RegisterAdditionalAssemblies();

            AvailableAssetTypes.Self.Initialize(FileManager.RelativeDirectory);

            #region Set up resizing

            mFormMethods = new FormMethods(0, 0, 0, 0);

            #endregion

            SpriteManager.Camera.BackgroundColor = Color.Gray;
            FlatRedBall.Math.Geometry.Polygon.TolerateEmptyPolygons = true;
            ExposedVariableManager.Initialize();

            try
            {
                RemotingServer.SetupPort(8686);
                RemotingServer.SetupInterface<SelectionInterface>();
                RemotingServer.SetupInterface<RegisterInterface>();
            }
            catch(Exception e)
            {
                System.Windows.Forms.MessageBox.Show("GlueView could not start, please make sure GlueView is not already running on your computer \n \n Exception: \n"+e.ToString());
                FlatRedBall.FlatRedBallServices.Game.Exit(); 
            }

            mToolForm.Show();
            
            GluxManager.ContentManagerName = "GlueView";


            EditorLogic.Initialize();

            CommandLineManager.Self.ProcessCommandLineArgs(this.mToolForm);

            Form form = Form.FromHandle(FlatRedBallServices.WindowHandle) as Form;
            form.Resize += HandleResize;
            
            base.Initialize();
        }
Пример #2
0
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            FlatRedBallServices.InitializeFlatRedBall(this, this.graphics);
            FlatRedBall.Graphics.Renderer.UseRenderTargets = true;
            SpriteManager.Camera.FarClipPlane = 20000;

            // Since the application will be using the FlatRedBall GUI the
            // mouse needs to be visible and the GUI needs to be enabled.
            IsMouseVisible = true;
            GuiManager.IsUIEnabled = true;

            this.Window.AllowUserResizing = true;

            mFormMethods = new FormMethods();

            FlatRedBallServices.GraphicsOptions.BackgroundColor = Color.Gray;

            base.Initialize();
        }
Пример #3
0
        protected override void Initialize()
        {
            Renderer.UseRenderTargets = false;
            FlatRedBallServices.InitializeFlatRedBall(this, graphics);

            LightManager.AddAmbientLight(Color.White);

            
            IsMouseVisible = true;
            GuiManager.IsUIEnabled = true;

            FormMethods methods = new FormMethods();
            SpriteManager.Camera.CameraModelCullMode = FlatRedBall.Graphics.CameraModelCullMode.None;

            methods.AllowFileDrop(EditorData.HandleDragDrop);

            EditorData.Initialize();
            GuiData.Initialize();

            ProcessCommandLineArguments();

            base.Initialize();
        }