| 612 | } |
| 613 | |
| 614 | void SpriteZOrder::reorderSprite(float dt) |
| 615 | { |
| 616 | auto sprite = static_cast<Sprite*>(getChildByTag(kTagSprite1)); |
| 617 | |
| 618 | int z = sprite->getLocalZOrder(); |
| 619 | |
| 620 | if (z < -1) |
| 621 | _dir = 1; |
| 622 | if (z > 10) |
| 623 | _dir = -1; |
| 624 | |
| 625 | z += _dir * 3; |
| 626 | |
| 627 | reorderChild(sprite, z); |
| 628 | } |
| 629 | |
| 630 | std::string SpriteZOrder::title() const |
| 631 | { |
nothing calls this directly
no test coverage detected