mirror of https://github.com/axmolengine/axmol.git
Update CCScene.cpp
in line 157, here need to create and add camera, if not ,in the function createWithPhysics, will show black screen.
This commit is contained in:
parent
ddde741d86
commit
63c9780c49
|
@ -153,6 +153,10 @@ bool Scene::initWithPhysics()
|
|||
{
|
||||
Director * director;
|
||||
CC_BREAK_IF( ! (director = Director::getInstance()) );
|
||||
// add camera
|
||||
auto camera = Camera::create();
|
||||
addChild(camera);
|
||||
|
||||
this->setContentSize(director->getWinSize());
|
||||
CC_BREAK_IF(! (_physicsWorld = PhysicsWorld::construct(*this)));
|
||||
|
||||
|
|
Loading…
Reference in New Issue