| 86 | } |
| 87 | |
| 88 | void PhysicsDemo::onEnter() |
| 89 | { |
| 90 | TestCase::onEnter(); |
| 91 | |
| 92 | _spriteTexture = SpriteBatchNode::create("Images/grossini_dance_atlas.png", 100)->getTexture(); |
| 93 | |
| 94 | // menu for debug layer |
| 95 | MenuItemFont::setFontSize(18); |
| 96 | auto item = MenuItemFont::create("Toggle debug", AX_CALLBACK_1(PhysicsDemo::toggleDebugCallback, this)); |
| 97 | |
| 98 | auto menu = Menu::create(item, nullptr); |
| 99 | this->addChild(menu); |
| 100 | menu->setPosition(Vec2(VisibleRect::right().x - item->getContentSize().width / 2 - 10, |
| 101 | VisibleRect::top().y - item->getContentSize().height / 2 - 10)); |
| 102 | } |
| 103 | |
| 104 | Sprite* PhysicsDemo::addGrossiniAtPosition(Vec2 p, float scale /* = 1.0*/) |
| 105 | { |
nothing calls this directly
no test coverage detected