internal void Update(XGameTime gameTime) { foreach (XGameWindow window in this.allGameWindows) { if (window.Cursor != null) { window.Cursor.Update(gameTime); } } }
public XGame() { #region GameLoop stuff this.lastUpdateCount = new int[4]; this.timer = new XTimerTick(); this.gameTime = new XGameTime(); const int BadUpdateCountTime = 2; var maxLastCount = 2 * Math.Min(BadUpdateCountTime, this.lastUpdateCount.Length); this.updateCountAverageSlowLimit = (float)(maxLastCount + (this.lastUpdateCount.Length - maxLastCount)) / this.lastUpdateCount.Length; this.totalGameTime = new TimeSpan(); this.accumulatedElapsedGameTime = new TimeSpan(); this.lastFrameElapsedGameTime = new TimeSpan(); this.IsFixedTimeStep = true; // false; this.maximumElapsedTime = TimeSpan.FromMilliseconds(500.0); this.inactiveSleepTime = TimeSpan.FromSeconds(1.0); this.TargetElapsedTime = TimeSpan.FromTicks(10000000 / 60); this.nextLastUpdateCountIndex = 0; this.IsActive = true; #endregion }
/// <summary> /// Draws the Game /// </summary> /// <param name="gameTime">Time passed since the last call to Draw</param> protected virtual void Draw(XGameTime gameTime) { }
/// <summary> /// Updates the Game /// </summary> /// <param name="gameTime">Time passed since the last call to Update</param> protected virtual void Update(XGameTime gameTime) { }
// todo private void DrawGameSystems(XGameTime gameTime) { }
// todo private void UpdateGameSystems(XGameTime gameTime) { }
public abstract void Update(XGameTime gameTime);