2010-12-04 16:14:34 +00:00
|
|
|
|
/********************************************************
|
|
|
|
|
* GameTime.h *
|
|
|
|
|
* *
|
|
|
|
|
* XFX GameTime definition file *
|
|
|
|
|
* Copyright <EFBFBD> XFX Team. All Rights Reserved *
|
|
|
|
|
********************************************************/
|
|
|
|
|
#ifndef _XFX_GAMETIME_
|
|
|
|
|
#define _XFX_GAMETIME_
|
|
|
|
|
|
|
|
|
|
#include <System/TimeSpan.h>
|
|
|
|
|
|
|
|
|
|
using namespace System;
|
|
|
|
|
|
|
|
|
|
namespace XFX
|
|
|
|
|
{
|
2011-11-07 01:29:50 +00:00
|
|
|
|
// Snapshot of the game timing state expressed in values that can be used by variable-step (real time) or fixed- step (game time) games.
|
2012-09-28 20:36:02 +00:00
|
|
|
|
class GameTime : public Object
|
2010-12-04 16:14:34 +00:00
|
|
|
|
{
|
|
|
|
|
private:
|
|
|
|
|
TimeSpan _elapsedGameTime;
|
|
|
|
|
bool _isRunningSlowly;
|
|
|
|
|
TimeSpan _totalGameTime;
|
|
|
|
|
|
|
|
|
|
public:
|
2012-09-28 20:36:02 +00:00
|
|
|
|
TimeSpan getElapsedGameTime() const;
|
2010-12-04 16:14:34 +00:00
|
|
|
|
bool IsRunningSlowly();
|
2012-09-28 20:36:02 +00:00
|
|
|
|
TimeSpan getTotalGameTime() const;
|
2010-12-04 16:14:34 +00:00
|
|
|
|
|
2012-09-28 20:36:02 +00:00
|
|
|
|
GameTime(const TimeSpan totalGameTime, const TimeSpan elapsedGameTime);
|
|
|
|
|
GameTime(const TimeSpan totalGameTime, const TimeSpan elapsedGameTime, const bool isRunningSlowly);
|
2010-12-04 16:14:34 +00:00
|
|
|
|
GameTime();
|
2012-09-28 20:36:02 +00:00
|
|
|
|
|
|
|
|
|
int GetType() const;
|
2010-12-04 16:14:34 +00:00
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif //_XFX_GAMETIME_
|