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

Method NodeGlobalZValueTest

tests/cpp-tests/Source/NodeTest/NodeTest.cpp:885–909  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

883/// NodeGlobalZValueTest
884
885NodeGlobalZValueTest::NodeGlobalZValueTest()
886{
887 Size s = Director::getInstance()->getWinSize();
888 for (int i = 0; i < 9; i++)
889 {
890 Sprite* sprite;
891 auto parent = Node::create();
892 if (i == 4)
893 {
894 sprite = Sprite::create("Images/grossinis_sister2.png");
895 _sprite = sprite;
896 _sprite->setGlobalZOrder(-1);
897 }
898 else
899 sprite = Sprite::create("Images/grossinis_sister1.png");
900
901 parent->addChild(sprite);
902 this->addChild(parent);
903
904 float w = sprite->getContentSize().width;
905 sprite->setPosition(s.width / 2 - w * 0.7 * (i - 5), s.height / 2);
906 }
907
908 this->scheduleUpdate();
909}
910
911void NodeGlobalZValueTest::update(float dt)
912{

Callers

nothing calls this directly

Calls 7

getInstanceFunction · 0.85
createFunction · 0.85
scheduleUpdateMethod · 0.80
setGlobalZOrderMethod · 0.45
addChildMethod · 0.45
getContentSizeMethod · 0.45
setPositionMethod · 0.45

Tested by

no test coverage detected