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

Method onEnter

tests/cpp-tests/Source/PhysicsTest/PhysicsTest.cpp:88–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86}
87
88void 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
104Sprite* PhysicsDemo::addGrossiniAtPosition(Vec2 p, float scale /* = 1.0*/)
105{

Callers

nothing calls this directly

Calls 15

createFunction · 0.85
setFontSizeFunction · 0.85
topFunction · 0.85
getPixelFunction · 0.85
PhysicsMaterialFunction · 0.85
leftFunction · 0.85
scheduleUpdateFunction · 0.85
Color3BFunction · 0.85
addBallFunction · 0.85
getInstanceFunction · 0.85
addComponentMethod · 0.80

Tested by

no test coverage detected