mirror of https://github.com/axmolengine/axmol.git
move create camera to Scene::initWithSize
This commit is contained in:
parent
933439c6ca
commit
2576622778
|
@ -54,16 +54,16 @@ Scene::~Scene()
|
|||
|
||||
bool Scene::init()
|
||||
{
|
||||
//create default camera
|
||||
auto camera = Camera::create();
|
||||
addChild(camera);
|
||||
|
||||
auto size = Director::getInstance()->getWinSize();
|
||||
return initWithSize(size);
|
||||
}
|
||||
|
||||
bool Scene::initWithSize(const Size& size)
|
||||
{
|
||||
//create default camera
|
||||
auto camera = Camera::create();
|
||||
addChild(camera);
|
||||
|
||||
setContentSize(size);
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue