Summary description for GameData.
コード例 #1
0
ファイル: GameMain.cs プロジェクト: vchelaru/FlatRedBall
		public GameForm() : base()
		{

			//set the window caption.  This should be the name of your game with version number.  
			//Edit your assembly info to alter your version number of your game
            this.Text = "ParticleEditor - Editing unsaved .emix";

            camera = SpriteManager.Cameras[0];

            cursor = GuiManager.Cursor;

            FlatRedBallServices.Update();


			gameData = new EditorData();

			gameData.Initialize(this);


                EditorData.guiData.Initialize();



			GuiData.Messages.Initialize(this);

            GuiManager.RefreshTextSize();
		}
コード例 #2
0
        public override void ProcessCommandLineArgument(string argument)
        {
            string extension = FileManager.GetExtension(argument);

            switch (extension)
            {
            case "emix":
                EditorData.LoadEmitters(argument);

                break;
            }
        }
コード例 #3
0
        private void KeyboardControl()
        {
            if (InputManager.ReceivingInput != null)
            {
                return;
            }

            #region Escape for exit
            if (InputManager.Keyboard.KeyPushed(Keys.Escape))
            {
                OkCancelWindow ocw = GuiManager.ShowOkCancelWindow("Exit ParticleEditor?  Unsaved data will be lost", "Exit?");
                ocw.OkClick += new GuiMessage(GuiData.Messages.ExitOk);
            }
            #endregion

            #region press space to emit current emitter
            if (InputManager.Keyboard.KeyPushed(Keys.Space) && AppState.Self.CurrentEmitter != null)
            {
                AppState.Self.CurrentEmitter.Emit(null);
            }
            #endregion

            #region Ctrl + C for copying emitter
            if ((InputManager.Keyboard.KeyDown(Keys.LeftControl) || InputManager.Keyboard.KeyDown(Keys.RightControl)) && InputManager.Keyboard.KeyPushed(Keys.C))
            {
                EditorData.CopyCurrentEmitter();
            }
            #endregion

            #region pressing C to clear all particles
            else if (InputManager.Keyboard.KeyPushed(Keys.C))
            {
                GuiData.ActivityWindow.ClearAllParticles();
            }
            #endregion

            #region pressing delete to delete the current emitter
            if (InputManager.Keyboard.KeyPushed(Keys.Delete))
            {
                DeleteCurrentEmitter();
            }
            #endregion

            if (InputManager.Keyboard.KeyPushed(Keys.A))
            {
                GuiData.ToolsWindow.attachObject.Press();
            }
            if (InputManager.Keyboard.KeyPushed(Keys.M))
            {
                GuiData.ToolsWindow.moveObject.Press();
            }
        }
コード例 #4
0
        protected override void Update(GameTime gameTime)
        {
            try
            {
                FlatRedBallServices.Update(gameTime);


                EditorData.Update();

                if (EditorData.Scene != null)
                {
                    foreach (SpriteGrid spriteGrid in EditorData.Scene.SpriteGrids)
                    {
                        spriteGrid.Manage();
                    }
                }

                base.Update(gameTime);
            }
            catch (Exception e)
            {
                System.Windows.Forms.MessageBox.Show(e.ToString());
            }
        }
コード例 #5
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();
        }
コード例 #6
0
        public void EmitterArrayListBoxClick(FlatRedBall.Gui.Window callingWindow)
        {
            ListBoxBase asListBoxBase = callingWindow as ListBoxBase;

            EditorData.SelectEmitter((Emitter)asListBoxBase.GetFirstHighlightedObject());
        }