Glatzemann 55fac0cc5a - refactored and fixed game timing and timers (bug #988)
- minor updates in ModelSample
- added new media file: ANX Logo mesh (vertex colors, FBX-Format)
2012-09-01 11:20:05 +00:00

52 lines
1.2 KiB
C#

#region Using Statements
using ANX.Framework.NonXNA;
using ANX.Framework.NonXNA.PlatformSystem;
using System;
#endregion
// This file is part of the ANX.Framework created by the
// "ANX.Framework developer group" and released under the Ms-PL license.
// For details see: http://anxframework.codeplex.com/license
namespace ANX.Framework
{
//TODO: this class is public on Windows Phone
internal class GameTimer
{
private INativeGameTimer nativeImplementation;
private TimeSpan lastUpdate;
public GameTimer()
{
nativeImplementation = AddInSystemFactory.DefaultPlatformCreator.CreateGameTimer();
nativeImplementation.Reset();
lastUpdate = nativeImplementation.ElapsedTime;
}
public void Update()
{
nativeImplementation.Update();
lastUpdate = nativeImplementation.ElapsedTime;
}
public TimeSpan Elapsed
{
get
{
return nativeImplementation.ElapsedTime;
}
}
public long Timestamp
{
get
{
return nativeImplementation.Timestamp;
}
}
}
}