Merge pull request #11 from simdsoft/sync-v4

Sync v4
This commit is contained in:
HALX99 2019-11-26 08:49:56 -08:00 committed by GitHub
commit 703a058aac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 38 additions and 16 deletions

View File

@ -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()
{

View File

@ -83,20 +83,22 @@ PongLayer::PongLayer()
Vector<Paddle*> 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;

View File

@ -11,7 +11,7 @@ function TextInput.create()
local width = 200
local height = 40
local back = ccui.Scale9Sprite:create(res)
local edit = ccui.EditBox:create(cc.size(width,height),res)
local edit = ccui.EditBox:create(cc.size(width,height),back)
layer:addChild(edit)
edit:setPosition( cc.p(250,200) )
edit:setPlaceHolder("click to input text")

View File

@ -65,20 +65,26 @@ local function CreateTouchesLayer()
local paddlesM = {}
local paddle = Paddle:paddleWithTexture(paddleTexture);
paddle:setPosition( cc.p(VisibleRect:center().x, VisibleRect:bottom().y + 15) );
local paddleStep =( VisibleRect:getVisibleRect().height - kStatusBarHeight - 30 - 3 * paddleTexture:getPixelsHigh() ) / 3 + paddleTexture:getPixelsHigh()
local nextPaddlePos = VisibleRect:bottom().y + 15
local paddle = Paddle:paddleWithTexture(paddleTexture)
paddle:setPosition( cc.p(VisibleRect:center().x, nextPaddlePos) )
paddlesM[#paddlesM+1] = paddle
paddle = Paddle:paddleWithTexture( paddleTexture );
paddle:setPosition( cc.p(VisibleRect:center().x, VisibleRect:top().y - kStatusBarHeight - 15) );
nextPaddlePos = nextPaddlePos + paddleStep
paddle = Paddle:paddleWithTexture( paddleTexture )
paddle:setPosition( cc.p(VisibleRect:center().x, nextPaddlePos) )
paddlesM[#paddlesM+1] = paddle
paddle = Paddle:paddleWithTexture( paddleTexture );
paddle:setPosition( cc.p(VisibleRect:center().x, VisibleRect:bottom().y + 100) );
nextPaddlePos = nextPaddlePos + paddleStep
paddle = Paddle:paddleWithTexture( paddleTexture )
paddle:setPosition( cc.p(VisibleRect:center().x, nextPaddlePos) )
paddlesM[#paddlesM+1] = paddle
paddle = Paddle:paddleWithTexture( paddleTexture );
paddle:setPosition( cc.p(VisibleRect:center().x, VisibleRect:top().y - kStatusBarHeight - 100) );
nextPaddlePos = nextPaddlePos + paddleStep
paddle = Paddle:paddleWithTexture( paddleTexture )
paddle:setPosition( cc.p(VisibleRect:center().x, nextPaddlePos) )
paddlesM[#paddlesM+1] = paddle
m_paddles = paddlesM

View File

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

@ -1 +1 @@
Subproject commit 56f86f7331cdac89fbd19f6b75963a4c12f53089
Subproject commit 5727ff7aefcf952e078f84da7d3aa63495a31757