axiosengine 

axiosengine Commit Details


Date:2012-04-08 14:40:58 (12 years 6 months ago)
Author:nathan@daedalus
Branch:master
Commit:6e86581e13b9784214237b7358bbd382be209d51
Parents: b3183d6f04833aa3b1e29d421c421064d88f62da
Message:- Adding a check in the AxiosTimer update to only tick if the game is active

Changes:

File differences

axios/Axios_settings.cs
5959
6060
6161
62
63
64
6265
6366
6467
* 1.0.1.2 - 4/1/2012
* - Making AxiosTimer inheirt from AxiosGameObject for it to be casted properly
*
* 1.0.1.3 - 4/7/2012
* - Adding a check in the AxiosTimer update to only tick if the game is active
*
*/
using System.Reflection;
axios/Engine/AxiosTimer.cs
3737
3838
3939
40
41
40
4241
43
42
4443
45
44
4645
47
48
49
50
46
47
48
5149
50
51
52
53
54
55
56
57
5258
5359
5460
55
56
57
58
5961
6062
6163
public override void Update(AxiosGameScreen gameScreen, GameTime gameTime, bool otherScreenHasFocus, bool coveredByOtherScreen)
{
if (_enabled)
if (gameScreen.IsActive) //only "tick" if the window has focus - otherwise the Timer will play catchup
{
if (gameTime.TotalGameTime - lastTick >= interval)
if (_enabled)
{
if (Tick != null)
if (gameTime.TotalGameTime - lastTick >= interval)
{
//EventArgs e = new EventArgs();
Tick(this, null);
}
if (Tick != null)
{
//EventArgs e = new EventArgs();
Tick(this, null);
}
lastTick = gameTime.TotalGameTime;
}
}
else
{
lastTick = gameTime.TotalGameTime;
}
}
else
{
lastTick = gameTime.TotalGameTime;
}
}
public override void LoadContent(AxiosGameScreen gameScreen)

Archive Download the corresponding diff file

Branches

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