Пример #1
0
        public GameForm() : base()
        {
            this.DragEnter += new System.Windows.Forms.DragEventHandler(this.GameForm_DragDrop);

            this.Text = "SpriteEditor - untitled scene";

            camera = new SpriteEditor.SEPositionedObjects.EditorCamera(FlatRedBallServices.GlobalContentManager);
            SpriteManager.Cameras[0]    = camera;
            camera.DestinationRectangle =
                new Rectangle(0, 0, FlatRedBallServices.ClientWidth, FlatRedBallServices.ClientHeight);
            camera.FixAspectRatioYConstant();

            if (this.IsDisposed)
            {
                return;
            }

            // this is a little different than what is normally done in the FRBTemplate;
            // instead of using the SpriteManager's regularly created Camera, make a new
            // EditorCamera and throw that in the SpriteManager's array.

            cursor = new SECursor(camera, this);

            //GuiManager.Initialize(camera, "genGfx/defaultText.tga", this, cursor);
            GuiManager.Cursors[0] = cursor;

            FlatRedBallServices.Update(null);

            SpriteEditorSettings.Initialize();
            SpriteManager.MaxParticleCount = 10000;
            GameData.Initialize();
            GuiData.Initialize();
            GuiData.messages.Initialize(this);
        }
Пример #2
0
        public GameForm() : base()
		{
            this.DragEnter += new System.Windows.Forms.DragEventHandler(this.GameForm_DragDrop);
       
			this.Text = "SpriteEditor - untitled scene";

            camera = new SpriteEditor.SEPositionedObjects.EditorCamera(FlatRedBallServices.GlobalContentManager);
            SpriteManager.Cameras[0] = camera;
            camera.DestinationRectangle = 
                new Rectangle(0, 0, FlatRedBallServices.ClientWidth, FlatRedBallServices.ClientHeight);
            camera.FixAspectRatioYConstant();
           
            if(this.IsDisposed)	return;
			
            // this is a little different than what is normally done in the FRBTemplate;
            // instead of using the SpriteManager's regularly created Camera, make a new 
            // EditorCamera and throw that in the SpriteManager's array.

			cursor = new SECursor(camera, this);

            //GuiManager.Initialize(camera, "genGfx/defaultText.tga", this, cursor);
            GuiManager.Cursors[0] = cursor;

            FlatRedBallServices.Update(null);

            SpriteEditorSettings.Initialize();
            SpriteManager.MaxParticleCount = 10000;
			GameData.Initialize();
			GuiData.Initialize();
			GuiData.messages.Initialize(this);
		}