mirror of https://github.com/axmolengine/axmol.git
commit
703a058aac
|
@ -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()
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
Loading…
Reference in New Issue