Browse Source

Arrumando

capellaresumo 6 years ago
parent
commit
8469c2345e

+ 3 - 8
Classes/AppDelegate.cpp

@@ -60,7 +60,9 @@ bool AppDelegate::applicationDidFinishLaunching() {
     }
 
     // turn on display FPS
+#if DEBUG
     director->setDisplayStats(true);
+#endif
 
     // set FPS. the default value is 1.0/60 if you don't call this
     director->setAnimationInterval(1.0f / 60);
@@ -84,17 +86,10 @@ bool AppDelegate::applicationDidFinishLaunching() {
     //     director->setContentScaleFactor(MIN(smallResolutionSize.height/designResolutionSize.height, smallResolutionSize.width/designResolutionSize.width));
     // }
     
-//    if (!UserDefault::getInstance()->isXMLFileExist()) {
-//        //CCLOG(UserDefault::getInstance()->getXMLFilePath());
-//    }
 
     register_all_packages();
 
-    // create a scene. it's an autorelease object
-//    auto scene = BeginScene::createScene();
-//
-//    // run
-//    director->runWithScene(scene);
+
     Scene* scene = BeginScene::createScene();
     director->runWithScene(scene);
 

+ 1 - 0
Classes/AppDelegate.h

@@ -33,6 +33,7 @@ public:
     @brief  Called when the application reenters the foreground
     @param  the pointer of the application
     */
+    
     virtual void applicationWillEnterForeground();
 };
 

+ 1 - 2
Classes/GameScene.cpp

@@ -118,9 +118,8 @@ bool GameScene::init() {
 
 void GameScene::addAndThrowBall() {
     Ball* ball = Ball::create();
+    while (paddle->getPositionX() == 0.0);
     ball->setPosition(paddle->getPositionX(), PADDLE_ALTURA+BALL_SIZE+0.1);
-    while (paddle->getPositionX() == 0.0)
-        ball->setPosition(paddle->getPositionX(), PADDLE_ALTURA+BALL_SIZE+0.1);
     ball->throwBall();
     balls->addChild(ball, 21);
 }

+ 0 - 2
proj.ios_mac/RedCore.xcodeproj/project.pbxproj

@@ -171,7 +171,6 @@
 		9AD1A7D61EEC912100423D30 /* Ball.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Ball.h; path = ../Classes/GameScene/Ball.h; sourceTree = "<group>"; };
 		9AD1A7D71EEC912100423D30 /* BlocksLayer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BlocksLayer.cpp; path = ../Classes/GameScene/BlocksLayer.cpp; sourceTree = "<group>"; };
 		9AD1A7D81EEC912100423D30 /* BlocksLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BlocksLayer.h; path = ../Classes/GameScene/BlocksLayer.h; sourceTree = "<group>"; };
-		9AD1A7D91EEC912100423D30 /* GameScene.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GameScene.h; path = ../Classes/GameScene/GameScene.h; sourceTree = "<group>"; };
 		9AD1A7DA1EEC912100423D30 /* Paddle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Paddle.cpp; path = ../Classes/GameScene/Paddle.cpp; sourceTree = "<group>"; };
 		9AD1A7DB1EEC912100423D30 /* Paddle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Paddle.h; path = ../Classes/GameScene/Paddle.h; sourceTree = "<group>"; };
 		BF170DB012928DE900B8313A /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; };
@@ -383,7 +382,6 @@
 				9AD1A7D61EEC912100423D30 /* Ball.h */,
 				9AD1A7D71EEC912100423D30 /* BlocksLayer.cpp */,
 				9AD1A7D81EEC912100423D30 /* BlocksLayer.h */,
-				9AD1A7D91EEC912100423D30 /* GameScene.h */,
 				9AD1A7DA1EEC912100423D30 /* Paddle.cpp */,
 				9AD1A7DB1EEC912100423D30 /* Paddle.h */,
 			);

BIN
proj.ios_mac/RedCore.xcodeproj/project.xcworkspace/xcuserdata/capella.xcuserdatad/UserInterfaceState.xcuserstate