ETimer增加setRunAtOnce函数,让定时器在绑定后立即执行一次
This commit is contained in:
parent
2fca388cb2
commit
5e0ea2be92
|
|
@ -79,6 +79,11 @@ void e2d::ETimer::setRepeatTimes(int repeatTimes)
|
|||
m_nRepeatTimes = repeatTimes;
|
||||
}
|
||||
|
||||
void e2d::ETimer::setRunAtOnce(bool bAtOnce)
|
||||
{
|
||||
m_bAtOnce = bAtOnce;
|
||||
}
|
||||
|
||||
void e2d::ETimer::bindWith(EScene * pParentScene)
|
||||
{
|
||||
ETimerManager::bindTimer(this, pParentScene);
|
||||
|
|
|
|||
|
|
@ -66,7 +66,12 @@ public:
|
|||
|
||||
// 设置定时器重复执行次数
|
||||
void setRepeatTimes(
|
||||
int repeatTimes
|
||||
int nRepeatTimes
|
||||
);
|
||||
|
||||
// 设置定时器在绑定后立即执行一次
|
||||
virtual void setRunAtOnce(
|
||||
bool bAtOnce
|
||||
);
|
||||
|
||||
// 绑定定时器到场景
|
||||
|
|
|
|||
Loading…
Reference in New Issue