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

Method createWithOffset

core/2d/Action.cpp:186–201  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

184}
185
186Follow* Follow::createWithOffset(Node* followedNode, float xOffset, float yOffset, const Rect& rect /*= Rect::ZERO*/)
187{
188
189 Follow* follow = new Follow();
190
191 bool valid = follow->initWithTargetAndOffset(followedNode, xOffset, yOffset, rect);
192
193 if (valid)
194 {
195 follow->autorelease();
196 return follow;
197 }
198
199 delete follow;
200 return nullptr;
201}
202Follow* Follow::clone() const
203{
204 // no copy constructor

Callers

nothing calls this directly

Calls 2

autoreleaseMethod · 0.80

Tested by

no test coverage detected