| 883 | /// NodeGlobalZValueTest |
| 884 | |
| 885 | NodeGlobalZValueTest::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 | |
| 911 | void NodeGlobalZValueTest::update(float dt) |
| 912 | { |
nothing calls this directly
no test coverage detected