| 153 | TimerTargetCallback::TimerTargetCallback() : _target(nullptr), _callback(nullptr) {} |
| 154 | |
| 155 | bool TimerTargetCallback::initWithCallback(Scheduler* scheduler, |
| 156 | const ccSchedulerFunc& callback, |
| 157 | void* target, |
| 158 | std::string_view key, |
| 159 | float seconds, |
| 160 | unsigned int repeat, |
| 161 | float delay) |
| 162 | { |
| 163 | _scheduler = scheduler; |
| 164 | _target = target; |
| 165 | _callback = callback; |
| 166 | _key = key; |
| 167 | setupTimerWithInterval(seconds, repeat, delay); |
| 168 | return true; |
| 169 | } |
| 170 | |
| 171 | void TimerTargetCallback::trigger(float dt) |
| 172 | { |