TimerInfo重命名为TimerEntity,并加入e2d namespace
This commit is contained in:
parent
f91973255d
commit
384f332b6d
|
|
@ -1,10 +1,12 @@
|
|||
#include "..\e2dtool.h"
|
||||
#include "..\e2dnode.h"
|
||||
|
||||
class TimerInfo
|
||||
namespace e2d
|
||||
{
|
||||
class TimerEntity
|
||||
{
|
||||
public:
|
||||
TimerInfo(
|
||||
TimerEntity(
|
||||
const e2d::Function& func,
|
||||
const e2d::String& name,
|
||||
double delay,
|
||||
|
|
@ -61,13 +63,14 @@ public:
|
|||
e2d::String name;
|
||||
e2d::Function callback;
|
||||
};
|
||||
}
|
||||
|
||||
static std::vector<TimerInfo*> s_vTimers;
|
||||
static std::vector<e2d::TimerEntity*> s_vTimers;
|
||||
|
||||
|
||||
void e2d::Timer::start(const Function& func, double delay, int updateTimes, bool paused, const String& name)
|
||||
{
|
||||
auto timer = new (std::nothrow) TimerInfo(func, name, delay, updateTimes, paused);
|
||||
auto timer = new (std::nothrow) TimerEntity(func, name, delay, updateTimes, paused);
|
||||
s_vTimers.push_back(timer);
|
||||
}
|
||||
|
||||
|
|
@ -78,7 +81,7 @@ void e2d::Timer::start(const Function& func, const String& name)
|
|||
|
||||
void e2d::Timer::startOnce(const Function& func, double timeOut)
|
||||
{
|
||||
auto timer = new (std::nothrow) TimerInfo(func, L"", timeOut, 1, false);
|
||||
auto timer = new (std::nothrow) TimerEntity(func, L"", timeOut, 1, false);
|
||||
s_vTimers.push_back(timer);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue