MCPcopy Create free account
hub / github.com/axmolengine/axmol / initWithCallback

Method initWithCallback

core/base/Scheduler.cpp:155–169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

153TimerTargetCallback::TimerTargetCallback() : _target(nullptr), _callback(nullptr) {}
154
155bool 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
171void TimerTargetCallback::trigger(float dt)
172{

Callers 1

scheduleMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected