move create camera to Scene::initWithSize

This commit is contained in:
yangxiao 2014-08-11 10:07:23 +08:00
parent 933439c6ca
commit 2576622778
1 changed files with 4 additions and 4 deletions

View File

@ -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;
}