axiosengine 

axiosengine Commit Details


Date:2012-04-12 22:19:41 (12 years 6 months ago)
Author:nathan@daedalus
Branch:master
Commit:7b3442661e94acd185cb840c52c94b4ee008c794
Parents: 40b67fb6e8caae127ffae4f64a844a4ad6e2a328
Message:Adding a check to only tick a timer if the window is active

Changes:

File differences

axios/Engine/AxiosTimer.cs
3737
3838
3939
40
40
41
4142
4243
4344
......
4647
4748
4849
49
50
5051
5152
5253
public override void Update(AxiosGameScreen gameScreen, GameTime gameTime, bool otherScreenHasFocus, bool coveredByOtherScreen)
{
if (gameScreen.IsActive) //only "tick" if the window has focus - otherwise the Timer will play catchup
if (gameScreen.ScreenManager.Game.IsActive) //only "tick" if the window has focus - otherwise the Timer will play catchup
{
if (_enabled)
{
if (Tick != null)
{
//EventArgs e = new EventArgs();
//System.Diagnostics.Debugger.Break();
Tick(this, null);
}

Archive Download the corresponding diff file

Branches

Number of commits:
Page rendered in 0.07223s using 13 queries.