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

Method flipSprites

tests/cpp-tests/Source/SpriteTest/SpriteTest.cpp:1491–1503  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1489}
1490
1491void SpriteFlip::flipSprites(float dt)
1492{
1493 auto sprite1 = static_cast<Sprite*>(getChildByTag(kTagSprite1));
1494 auto sprite2 = static_cast<Sprite*>(getChildByTag(kTagSprite2));
1495
1496 bool x = sprite1->isFlippedX();
1497 bool y = sprite2->isFlippedY();
1498
1499 AXLOGD("Pre: {}", sprite1->getContentSize().height);
1500 sprite1->setFlippedX(!x);
1501 sprite2->setFlippedY(!y);
1502 AXLOGD("Post: {}", sprite1->getContentSize().height);
1503}
1504
1505std::string SpriteFlip::title() const
1506{

Callers

nothing calls this directly

Calls 11

getChildByTagFunction · 0.85
format_to_zFunction · 0.85
getInstanceFunction · 0.85
isFlippedXMethod · 0.80
isFlippedYMethod · 0.80
getSpriteFrameByNameMethod · 0.80
getContentSizeMethod · 0.45
setFlippedXMethod · 0.45
setFlippedYMethod · 0.45
getChildByTagMethod · 0.45
setSpriteFrameMethod · 0.45

Tested by

no test coverage detected