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

Method switchChild

tests/cpp-tests/Source/BugsTest/Bug-Child.cpp:70–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68}
69
70void BugChild::switchChild(Object* sender)
71{
72 if (parent1->getChildrenCount() > 0)
73 {
74 parent1->removeChild(child, false);
75 parent2->addChild(child);
76 AXLOGD("Child attached to parent2");
77 }
78 else
79 {
80 parent2->removeChild(child, false);
81 parent1->addChild(child);
82 AXLOGD("Child attached to parent1");
83 }
84}
85
86bool BugCameraMask::init()
87{

Callers

nothing calls this directly

Calls 3

getChildrenCountMethod · 0.45
removeChildMethod · 0.45
addChildMethod · 0.45

Tested by

no test coverage detected