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

Method init

core/2d/ActionInterval.cpp:221–238  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

219}
220
221bool Sequence::init(const Vector<FiniteTimeAction*>& arrayOfActions)
222{
223 auto count = arrayOfActions.size();
224 if (count == 0)
225 return false;
226
227 if (count == 1)
228 return initWithTwoActions(arrayOfActions.at(0), ExtraAction::create());
229
230 // else size > 1
231 auto prev = arrayOfActions.at(0);
232 for (int i = 1; i < count - 1; ++i)
233 {
234 prev = createWithTwoActions(prev, arrayOfActions.at(i));
235 }
236
237 return initWithTwoActions(prev, arrayOfActions.at(count - 1));
238}
239
240bool Sequence::initWithTwoActions(FiniteTimeAction* actionOne, FiniteTimeAction* actionTwo)
241{

Callers 1

createMethod · 0.45

Calls 3

createFunction · 0.85
sizeMethod · 0.45
atMethod · 0.45

Tested by

no test coverage detected