diff --git a/cocos/2d/CCActionGrid.cpp b/cocos/2d/CCActionGrid.cpp index 38fea5aba2..e92cdf781e 100644 --- a/cocos/2d/CCActionGrid.cpp +++ b/cocos/2d/CCActionGrid.cpp @@ -130,6 +130,18 @@ Rect Grid3DAction::getGridRect() const } // implementation of TiledGrid3DAction +TiledGrid3DAction* TiledGrid3DAction::create(float duration, const Size &gridSize) +{ + TiledGrid3DAction *ret = new (std::nothrow) TiledGrid3DAction(); + if (ret && ret->initWithDuration(duration, gridSize)) + { + ret->autorelease(); + return ret; + } + + delete ret; + return nullptr; +} GridBase* TiledGrid3DAction::getGrid() { diff --git a/tests/cpp-tests/Classes/TouchesTest/TouchesTest.cpp b/tests/cpp-tests/Classes/TouchesTest/TouchesTest.cpp index cf279f6075..37208c0584 100644 --- a/tests/cpp-tests/Classes/TouchesTest/TouchesTest.cpp +++ b/tests/cpp-tests/Classes/TouchesTest/TouchesTest.cpp @@ -83,20 +83,22 @@ PongLayer::PongLayer() Vector paddlesM(4); + float paddleStep =(VisibleRect::getVisibleRect().size.height - kStatusBarHeight - 30 - 3*paddleTexture->getPixelsHigh())/3 + paddleTexture->getPixelsHigh(); + float nextPaddlePos = VisibleRect::bottom().y + 15; Paddle* paddle = Paddle::createWithTexture(paddleTexture); - paddle->setPosition( Vec2(VisibleRect::center().x, VisibleRect::bottom().y + 15) ); + paddle->setPosition( Vec2(VisibleRect::center().x, nextPaddlePos)); paddlesM.pushBack( paddle ); paddle = Paddle::createWithTexture( paddleTexture ); - paddle->setPosition( Vec2(VisibleRect::center().x, VisibleRect::top().y - kStatusBarHeight - 15) ); + paddle->setPosition( Vec2(VisibleRect::center().x, nextPaddlePos+=paddleStep) ); paddlesM.pushBack( paddle ); - + paddle = Paddle::createWithTexture( paddleTexture ); - paddle->setPosition( Vec2(VisibleRect::center().x, VisibleRect::bottom().y + 100) ); + paddle->setPosition( Vec2(VisibleRect::center().x, nextPaddlePos+=paddleStep) ); paddlesM.pushBack( paddle ); - + paddle = Paddle::createWithTexture( paddleTexture ); - paddle->setPosition( Vec2(VisibleRect::center().x, VisibleRect::top().y - kStatusBarHeight - 100) ); + paddle->setPosition( Vec2(VisibleRect::center().x, nextPaddlePos+=paddleStep) ); paddlesM.pushBack( paddle ); _paddles = paddlesM; diff --git a/tools/appveyor-scripts/build.ps1 b/tools/appveyor-scripts/build.ps1 index 0874055842..2b47a05db1 100644 --- a/tools/appveyor-scripts/build.ps1 +++ b/tools/appveyor-scripts/build.ps1 @@ -102,6 +102,8 @@ If ($env:build_type -eq "android_cpp_tests") { } elseif ($env:build_type -eq "windows32_cmake_test") { Write-Host "Build tests project by cmake" + $ENV:PATH="$env:APPVEYOR_BUILD_FOLDER\tools\cocos2d-console\bin;$ENV:PATH" + & mkdir $env:APPVEYOR_BUILD_FOLDER\win32-build # if ($lastexitcode -ne 0) {throw} # mkdir return no-zero