AxiosEngine-old 

AxiosEngine-old Commit Details


Date:2012-04-12 22:19:00 (12 years 8 months ago)
Author:nathan@daedalus
Branch:default
Commit:5b5b96a46617
Parents: 902e4ea4393a
Message:Adding a check to only tick a timer if the window is active

Changes:
Maxios.suo
Maxios/Engine/AxiosTimer.cs (2 diffs)

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

Page rendered in 0.50860s using 13 queries.