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); }
protected override void Update(GameTime gameTime) { FlatRedBallServices.Update(gameTime); if (gameBall.sprite != null) { ScoreStateManage(); UpdateInput(); UpdateWiimotes(); CheckCollisions(); if (showPositions) { player1.updatePositionText(); player2.updatePositionText(); gameBall.updatePositionText(); } } else { WinStateManage(); GameStartStateManage(); } FlatRedBall.Screens.ScreenManager.Activity(); base.Update(gameTime); }
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(); }
protected override void Update(GameTime gameTime) { #if UNIT_TESTS ((Form)Form.FromHandle(Window.Handle)).WindowState = FormWindowState.Minimized; #endif FlatRedBallServices.Update(gameTime); CustomActivity(); FlatRedBall.Screens.ScreenManager.Activity(); string debugText = ""; if (FlatRedBall.Screens.ScreenManager.CurrentScreen != null) { debugText = FlatRedBall.Screens.ScreenManager.CurrentScreen + " " + FlatRedBall.Screens.ScreenManager.CurrentScreen.PauseAdjustedSecondsSince(0).ToString("0.00"); } if (GlobalContent.IsInitialized == false) { debugText += "\nGlobal Content still initializing..."; } else { debugText += "\nGlobal Content done initializing"; } FlatRedBall.Debugging.Debugger.TextCorner = FlatRedBall.Debugging.Debugger.Corner.BottomRight; FlatRedBall.Debugging.Debugger.Write(debugText); base.Update(gameTime); }
/// <summary> /// Allows the game to run logic such as updating the world, /// checking for collisions, gathering input, and playing audio. /// </summary> /// <param name="gameTime">Provides a snapshot of timing values.</param> protected override void Update(GameTime gameTime) { FlatRedBallServices.Update(gameTime); EditorData.Update(); base.Update(gameTime); }
protected override void Update(GameTime gameTime) { FlatRedBallServices.Update(gameTime); FlatRedBall.Screens.ScreenManager.Activity(); base.Update(gameTime); }
protected override void Update(GameTime gameTime) { FlatRedBallServices.Update(gameTime); GluxManager.Update(); HighlightManager.Self.Activity(); EditingManager.Self.Activity(); base.Update(gameTime); }
void GameForm_Activated(object sender, EventArgs e) { FlatRedBallServices.Update(null); if (FlatRedBallServices.IsInitialized) { GuiManager.Cursor.ResetCursor(); } }
protected override void Update(GameTime gameTime) { // Update FRB. FlatRedBallServices.Update(gameTime); FlatRedBall.Screens.ScreenManager.Activity(); // This needs to be called. Do not remove it. base.Update(gameTime); }
/// <summary> /// Allows the game to run logic such as updating the world, /// checking for collisions, gathering input, and playing audio. /// </summary> /// <param name="gameTime">Provides a snapshot of timing values.</param> protected override void Update(GameTime gameTime) { FlatRedBallServices.Update(gameTime); // I don't think GView needs a ScreenManager activity does it? //Screens.ScreenManager.Activity(); EditorLogic.Activity(); GluxManager.Update(); base.Update(gameTime); }
/// <summary> /// Allows the game to run logic such as updating the world, /// checking for collisions, gathering input, and playing audio. /// </summary> /// <param name="gameTime">Provides a snapshot of timing values.</param> protected override void Update(GameTime gameTime) { FlatRedBallServices.Update(gameTime); ScreenManager.Activity(); EditorLogic.Activity(); // TODO: Add your update logic here GluxManager.Update(); base.Update(gameTime); }
protected override void Update(GameTime gameTime) { // Update FRB. FlatRedBallServices.Update(gameTime); // This needs to be called. Do not remove it. base.Update(gameTime); _redBallSprite.X = FlatRedBall.Gui.GuiManager.Cursor.WorldXAt(0); _redBallSprite.Y = FlatRedBall.Gui.GuiManager.Cursor.WorldYAt(0); }
protected override void Update(GameTime gameTime) { FlatRedBallServices.Update(gameTime); FlatRedBall.Screens.ScreenManager.Activity(); if (InputManager.Keyboard.KeyDown(Keys.Escape)) { FlatRedBallServices.Game.Exit(); } base.Update(gameTime); }
/// <summary> /// Updates the game each cycle /// </summary> /// <param name="gameTime">Container for information about time elapsed since last update.</param> protected override void Update(GameTime gameTime) { FlatRedBallServices.Update(gameTime); FlatRedBall.Screens.ScreenManager.Activity(); if (previewEmitter != null) { previewEmitter.TimedEmit(particles); FlatRedBall.Debugging.Debugger.CommandLineWrite("Particles: " + particles.Count); } base.Update(gameTime); }
/// <summary> /// Allows the game to run logic such as updating the world, /// checking for collisions, gathering input, and playing audio. /// </summary> /// <param name="gameTime">Provides a snapshot of timing values.</param> protected override void Update(GameTime gameTime) { Form myForm = (Form)Form.FromHandle(this.Window.Handle); if (myForm.Focused) { FlatRedBallServices.Update(gameTime); EditorData.Update(); } base.Update(gameTime); }
protected override void Update(GameTime gameTime) { FlatRedBallServices.Update(gameTime); //for (var i = 0; i < 10; i++) //{ // GeneticsManager.PerformTest(i); //} FlatRedBall.Screens.ScreenManager.Activity(); base.Update(gameTime); }
protected override void Update(GameTime gameTime) //Runs once every frame { FlatRedBallServices.Update(gameTime); //does flatredball stuff foreach (GameObject g in new List <GameObject>(gameObjects)) //Runs the update method in all { g.Update(gameObjects); } FlatRedBall.Screens.ScreenManager.Activity(); //Again, flatredball stuff base.Update(gameTime); }
/// <summary> /// Allows the game to run logic such as updating the world, /// checking for collisions, gathering input, and playing audio. /// </summary> /// <param name="gameTime">Provides a snapshot of timing values.</param> protected override void Update(GameTime gameTime) { FlatRedBallServices.Update(gameTime); //Screens.ScreenManager.Activity(); EditorData.Update(); if (EditorData.Scene != null) { foreach (SpriteGrid spriteGrid in EditorData.Scene.SpriteGrids) { spriteGrid.Manage(); } } // TODO: Add your update logic here base.Update(gameTime); }
protected override void Update(GameTime gameTime) { FlatRedBallServices.Update(gameTime); FlatRedBall.Screens.ScreenManager.Activity(); if (InputManager.Keyboard.KeyReleased(Keys.V)) { cap = !cap; IsFixedTimeStep = cap; graphics.SynchronizeWithVerticalRetrace = cap; graphics.ApplyChanges(); } base.Update(gameTime); }
public void TestEvents() { IWindowImplementation iwi = new IWindowImplementation(); GuiManager.AddWindow(iwi); GuiManager.Cursor.UsingMouse = false; Microsoft.Xna.Framework.GameTime gameTime = new Microsoft.Xna.Framework.GameTime( new TimeSpan(0, 0, 0, 0, 1), new TimeSpan(0, 0, 0, 0, 1)); FlatRedBallServices.Update(gameTime); if (GuiManager.Cursor.WindowOver != iwi) { throw new Exception("The cursor should be over the window"); } }
protected override void Update(GameTime gameTime) { FlatRedBallServices.Update(gameTime); Globals.GameTime = gameTime; Globals.EventManager.PreActivity(); ScreenManager.Activity(); Globals.EventManager.PostActivity(); if (Debug.DebugMode) { if (Keyboard.KeyDown(Keys.LeftControl) && Keyboard.KeyPushed(Keys.H)) { Debug.Console.Visible = !Debug.Console.Visible; Debug.PrintDebug.Visible = !Debug.PrintDebug.Visible; } Debug.PrintDebug.PrintDebugString(); Debug.DequeueNewMessages(); } base.Update(gameTime); }
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()); } }
public override void Update(GameTime gameTime) { global::RenderingLibrary.SystemManagers.Default.Activity(gameTime.ElapsedGameTime.TotalSeconds); FlatRedBallServices.Update(gameTime); }
protected virtual void Update(GameTime gameTime) { // Update FRB FlatRedBallServices.Update(gameTime); }
public virtual void FrameUpdate() { FlatRedBallServices.Update(); }
/// <summary> /// Updates state manager and the states inside. /// </summary> /// <param name="time">Amount of time passed between calls.</param> protected override void Update(GameTime time) { //Updates the engines FlatRedBallServices.Update(time); Global.SoundManager.Update(time); Global.GUIManager.Update(time); Global.Logger.SetTime(time.TotalGameTime.ToString()); //Updates state #region Process state list //Trim states for (int i = 0; i < m_Depth; i++) { RemoveState(); } m_Depth = 0; //Is list empty? bool Empty = m_StateList.Count <= 0; //Does last state exist and not null? bool TopExist = false; if (!Empty) { TopExist = (m_StateList.Last.Value != null); } //No active state found bool ActiveFound = false; //While not empty, last state exist, and active state has not been found while (!Empty && TopExist && !ActiveFound) { //Remove last state if not active if (!m_StateList.Last.Value.IsActive()) { RemoveState(); } //Otherwise, found active state else { ActiveFound = true; } //Check if state is now empty Empty = m_StateList.Count <= 0; TopExist = Empty ? false : (m_StateList.Last != null); } //Quit if list is empty or last state doesn't exist if (Empty || !TopExist) { Exit(); } else { m_StateList.Last.Value.Update(time); } #endregion //Updates the original class); base.Update(time); }