AxiosEngine-old 

AxiosEngine-old Commit Details


Date:2012-04-08 14:40:00 (12 years 8 months ago)
Author:nathan@daedalus
Branch:default
Commit:e983ddaab7d8
Parents: 25cf22fd732b
Message:- Adding a check in the AxiosTimer update to only tick if the game is active

Changes:
Maxios.suo
Maxios/Axios_settings.cs (1 diff)
Maxios/Engine/AxiosTimer.cs (1 diff)

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
42
43
44
45
46
47
48
4049
41
42
43
50
51
52
53
54
55
56
4457
45
46
47
48
49
50
51
5258
5359
5460
55
56
57
58
5961
6062
6163
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 (_enabled)
{
if (gameTime.TotalGameTime - lastTick >= interval)
{
if (Tick != null)
{
//EventArgs e = new EventArgs();
if (_enabled)
{
if (gameTime.TotalGameTime - lastTick >= interval)
Tick(this, null);
}
lastTick = gameTime.TotalGameTime;
}
}
else
{
if (Tick != null)
{
//EventArgs e = new EventArgs();
Tick(this, null);
}
lastTick = gameTime.TotalGameTime;
}
}
else
{
lastTick = gameTime.TotalGameTime;
}
}
public override void LoadContent(AxiosGameScreen gameScreen)

Archive Download the corresponding diff file

Page rendered in 0.61905s using 13 queries.