From 2576622778a9773ab7ca7e4dc654fa62ccc086db Mon Sep 17 00:00:00 2001 From: yangxiao Date: Mon, 11 Aug 2014 10:07:23 +0800 Subject: [PATCH] move create camera to Scene::initWithSize --- cocos/2d/CCScene.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cocos/2d/CCScene.cpp b/cocos/2d/CCScene.cpp index 5fc4c3bd14..f373ec8017 100644 --- a/cocos/2d/CCScene.cpp +++ b/cocos/2d/CCScene.cpp @@ -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; }