mirror of https://github.com/axmolengine/axmol.git
issue #2433:Add lua deprecated fiel and modify some test samples
This commit is contained in:
parent
5f6d9815ca
commit
e557b6b7c2
|
@ -1 +1 @@
|
|||
1967da55fdcb71f9dd3dda53661eb4a1938803cf
|
||||
9420774ce7a3c38be6597cebe5a2888835d9c410
|
|
@ -54,8 +54,7 @@ local function main()
|
|||
-- moving dog at every frame
|
||||
local function tick()
|
||||
if spriteDog.isPaused then return end
|
||||
local position = spriteDog:getPosition()
|
||||
local x, y = position.x,position.y
|
||||
local x, y = spriteDog:getPosition()
|
||||
if x > origin.x + visibleSize.width then
|
||||
x = origin.x
|
||||
else
|
||||
|
@ -116,8 +115,7 @@ local function main()
|
|||
local function onTouchMoved(x, y)
|
||||
cclog("onTouchMoved: %0.2f, %0.2f", x, y)
|
||||
if touchBeginPoint then
|
||||
local position = layerFarm:getPosition()
|
||||
local cx, cy = position.x,position.y
|
||||
local cx, cy = layerFarm:getPosition()
|
||||
layerFarm:setPosition(cx + x - touchBeginPoint.x,
|
||||
cy + y - touchBeginPoint.y)
|
||||
touchBeginPoint = {x = x, y = y}
|
||||
|
|
|
@ -25,8 +25,7 @@ local function AccelerometerMainLayer()
|
|||
end
|
||||
|
||||
local szBall = pBall:getContentSize()
|
||||
local ptNow = pBall:getPosition()
|
||||
local ptNowX,ptNowY = ptNow.x, ptNow.y
|
||||
local ptNowX,ptNowY = pBall:getPosition()
|
||||
|
||||
local ptTmp = pDir:convertToUI(cc.p(ptNowX,ptNowY))
|
||||
ptTmp.x = ptTmp.x + x * 9.81
|
||||
|
|
|
@ -17,25 +17,13 @@ local function CrashTest()
|
|||
|
||||
--Sum of all action's duration is 1.5 second.
|
||||
child:runAction(cc.RotateBy:create(1.5, 90))
|
||||
--[[
|
||||
local arr = CCArray:create()
|
||||
arr:addObject(CCDelayTime:create(1.4))
|
||||
arr:addObject(CCFadeOut:create(1.1))
|
||||
]]--
|
||||
child:runAction(cc.Sequence:create(cc.DelayTime:create(1.4),cc.FadeOut:create(1.1)))
|
||||
|
||||
--[[
|
||||
arr = CCArray:create()
|
||||
arr:addObject(CCDelayTime:create(1.4))
|
||||
]]--
|
||||
local function removeThis()
|
||||
ret:getParent():removeChild(ret, true)
|
||||
Helper.nextAction()
|
||||
end
|
||||
--[[
|
||||
local callfunc = CCCallFunc:create(removeThis)
|
||||
arr:addObject(callfunc)
|
||||
]]--
|
||||
|
||||
--After 1.5 second, self will be removed.
|
||||
ret:runAction( cc.Sequence:create(cc.DelayTime:create(1.4),cc.CallFunc:create(removeThis)))
|
||||
return ret
|
||||
|
@ -52,18 +40,10 @@ local function LogicTest()
|
|||
local grossini = cc.Sprite:create(s_pPathGrossini)
|
||||
ret:addChild(grossini, 0, 2)
|
||||
grossini:setPosition(200,200)
|
||||
--[[
|
||||
local arr = CCArray:create()
|
||||
arr:addObject(CCMoveBy:create(1, CCPoint(150,0)))
|
||||
]]--
|
||||
local function bugMe(node)
|
||||
node:stopAllActions() --After this stop next action not working, if remove this stop everything is working
|
||||
node:runAction(cc.ScaleTo:create(2, 2))
|
||||
end
|
||||
--[[
|
||||
local callfunc = CCCallFunc:create(bugMe)
|
||||
arr:addObject(callfunc)
|
||||
]]--
|
||||
grossini:runAction( cc.Sequence:create(cc.MoveBy:create(1, cc.p(150,0)) ,cc.CallFunc:create(bugMe)))
|
||||
return ret
|
||||
end
|
||||
|
@ -133,11 +113,6 @@ local function RemoveTest()
|
|||
end
|
||||
|
||||
local callfunc = cc.CallFunc:create(stopAction)
|
||||
--[[
|
||||
local arr = CCArray:create()
|
||||
arr:addObject(pMove)
|
||||
arr:addObject(callfunc)
|
||||
]]--
|
||||
local pSequence = cc.Sequence:create(pMove,callfunc)
|
||||
pSequence:setTag(kTagSequence)
|
||||
|
||||
|
|
|
@ -72,29 +72,8 @@ local function SpriteEase()
|
|||
local move_ease_out_back = move_ease_out:reverse()
|
||||
|
||||
local delay = createSimpleDelayTime()
|
||||
--[[
|
||||
local arr1 = CCArray:create()
|
||||
arr1:addObject(move)
|
||||
arr1:addObject(delay)
|
||||
arr1:addObject(move_back)
|
||||
arr1:addObject(createSimpleDelayTime())
|
||||
]]--
|
||||
local seq1 = cc.Sequence:create(move, delay, move_back, createSimpleDelayTime())
|
||||
--[[
|
||||
local arr2 = CCArray:create()
|
||||
arr2:addObject(move_ease_in)
|
||||
arr2:addObject(createSimpleDelayTime())
|
||||
arr2:addObject(move_ease_in_back)
|
||||
arr2:addObject(createSimpleDelayTime())
|
||||
]]--
|
||||
local seq2 = cc.Sequence:create(move_ease_in,createSimpleDelayTime(),move_ease_in_back,createSimpleDelayTime())
|
||||
--[[
|
||||
local arr3 = CCArray:create()
|
||||
arr3:addObject(move_ease_out)
|
||||
arr3:addObject(createSimpleDelayTime())
|
||||
arr3:addObject(move_ease_out_back)
|
||||
arr3:addObject(createSimpleDelayTime())
|
||||
]]--
|
||||
local seq3 = cc.Sequence:create(move_ease_out,createSimpleDelayTime(),move_ease_out_back,createSimpleDelayTime())
|
||||
|
||||
local a2 = grossini:runAction(cc.RepeatForever:create(seq1))
|
||||
|
@ -128,30 +107,8 @@ local function SpriteEaseInOut()
|
|||
local move_ease_inout_back3 = move_ease_inout3:reverse()
|
||||
|
||||
local delay = createSimpleDelayTime()
|
||||
--[[
|
||||
local arr1 = CCArray:create()
|
||||
arr1:addObject(move_ease_inout1)
|
||||
arr1:addObject(delay)
|
||||
arr1:addObject(move_ease_inout_back1)
|
||||
arr1:addObject(createSimpleDelayTime())
|
||||
]]--
|
||||
local seq1 = cc.Sequence:create(move_ease_inout1,delay,move_ease_inout_back1,createSimpleDelayTime())
|
||||
|
||||
--[[
|
||||
local arr2 = CCArray:create()
|
||||
arr2:addObject(move_ease_inout2)
|
||||
arr2:addObject(createSimpleDelayTime())
|
||||
arr2:addObject(move_ease_inout_back2)
|
||||
arr2:addObject(createSimpleDelayTime())
|
||||
]]--
|
||||
local seq2 = cc.Sequence:create(move_ease_inout2,createSimpleDelayTime(),move_ease_inout_back2,createSimpleDelayTime())
|
||||
--[[
|
||||
local arr3 = CCArray:create()
|
||||
arr3:addObject(move_ease_inout3)
|
||||
arr3:addObject(createSimpleDelayTime())
|
||||
arr3:addObject(move_ease_inout_back3)
|
||||
arr3:addObject(createSimpleDelayTime())
|
||||
]]--
|
||||
local seq3 = cc.Sequence:create(move_ease_inout3, createSimpleDelayTime(), move_ease_inout_back3, createSimpleDelayTime() )
|
||||
|
||||
tamara:runAction(cc.RepeatForever:create(seq1))
|
||||
|
@ -178,37 +135,9 @@ local function SpriteEaseExponential()
|
|||
local move_ease_out_back = move_ease_out:reverse()
|
||||
|
||||
local delay = createSimpleDelayTime()
|
||||
|
||||
--[[
|
||||
local arr1 = CCArray:create()
|
||||
arr1:addObject(move)
|
||||
arr1:addObject(delay)
|
||||
arr1:addObject(move_back)
|
||||
|
||||
arr1:addObject(createSimpleDelayTime())
|
||||
]]--
|
||||
local seq1 = cc.Sequence:create(move, delay, move_back, createSimpleDelayTime() )
|
||||
--[[
|
||||
local arr2 = CCArray:create()
|
||||
arr2:addObject(move_ease_in)
|
||||
|
||||
arr2:addObject(createSimpleDelayTime())
|
||||
arr2:addObject(move_ease_in_back)
|
||||
|
||||
arr2:addObject(createSimpleDelayTime())
|
||||
]]--
|
||||
local seq2 = cc.Sequence:create(move_ease_in, createSimpleDelayTime(), move_ease_in_back, createSimpleDelayTime() )
|
||||
|
||||
--[[
|
||||
local arr3 = CCArray:create()
|
||||
arr3:addObject(move_ease_out)
|
||||
|
||||
arr3:addObject(createSimpleDelayTime())
|
||||
arr3:addObject(move_ease_out_back)
|
||||
|
||||
arr3:addObject(createSimpleDelayTime())
|
||||
]]--
|
||||
local seq3 = cc.Sequence:create(move_ease_out, createSimpleDelayTime(), move_ease_out_back, createSimpleDelayTime() )
|
||||
local seq1 = cc.Sequence:create(move, delay, move_back, createSimpleDelayTime())
|
||||
local seq2 = cc.Sequence:create(move_ease_in, createSimpleDelayTime(), move_ease_in_back, createSimpleDelayTime())
|
||||
local seq3 = cc.Sequence:create(move_ease_out, createSimpleDelayTime(), move_ease_out_back, createSimpleDelayTime())
|
||||
|
||||
grossini:runAction(cc.RepeatForever:create(seq1))
|
||||
tamara:runAction(cc.RepeatForever:create(seq2))
|
||||
|
@ -231,25 +160,7 @@ local function SpriteEaseExponentialInOut()
|
|||
local move_ease_back = move_ease:reverse()
|
||||
|
||||
local delay = createSimpleDelayTime()
|
||||
--[[
|
||||
local arr1 = CCArray:create()
|
||||
arr1:addObject(move)
|
||||
arr1:addObject(delay)
|
||||
arr1:addObject(move_back)
|
||||
|
||||
arr1:addObject(createSimpleDelayTime())
|
||||
]]--
|
||||
local seq1 = cc.Sequence:create(move, delay, move_back, createSimpleDelayTime())
|
||||
|
||||
--[[
|
||||
local arr2 = CCArray:create()
|
||||
arr2:addObject(move_ease)
|
||||
|
||||
arr2:addObject(createSimpleDelayTime())
|
||||
arr2:addObject(move_ease_back)
|
||||
|
||||
arr2:addObject(createSimpleDelayTime())
|
||||
]]--
|
||||
local seq2 = cc.Sequence:create(move_ease, createSimpleDelayTime(), move_ease_back, createSimpleDelayTime() )
|
||||
|
||||
positionForTwo()
|
||||
|
@ -277,30 +188,9 @@ local function SpriteEaseSine()
|
|||
local move_ease_out_back = move_ease_out:reverse()
|
||||
|
||||
local delay = createSimpleDelayTime()
|
||||
--[[
|
||||
local arr1 = CCArray:create()
|
||||
arr1:addObject(move)
|
||||
arr1:addObject(delay)
|
||||
arr1:addObject(move_back)
|
||||
arr1:addObject(createSimpleDelayTime())
|
||||
]]--
|
||||
local seq1 = cc.Sequence:create(move, delay, move_back, createSimpleDelayTime() )
|
||||
--[[
|
||||
local arr2 = CCArray:create()
|
||||
arr2:addObject(move_ease_in)
|
||||
arr2:addObject(createSimpleDelayTime())
|
||||
arr2:addObject(move_ease_in_back)
|
||||
arr2:addObject(createSimpleDelayTime())
|
||||
]]--
|
||||
local seq2 = cc.Sequence:create(move_ease_in, createSimpleDelayTime(), move_ease_in_back, createSimpleDelayTime() )
|
||||
--[[
|
||||
local arr3 = CCArray:create()
|
||||
arr3:addObject(move_ease_out)
|
||||
arr3:addObject(createSimpleDelayTime())
|
||||
arr3:addObject(move_ease_out_back)
|
||||
arr3:addObject(createSimpleDelayTime())
|
||||
]]--
|
||||
local seq3 = cc.Sequence:create(move_ease_out, createSimpleDelayTime(), move_ease_out_back,createSimpleDelayTime() )
|
||||
local seq2 = cc.Sequence:create(move_ease_in, createSimpleDelayTime(), move_ease_in_back, createSimpleDelayTime())
|
||||
local seq3 = cc.Sequence:create(move_ease_out, createSimpleDelayTime(), move_ease_out_back,createSimpleDelayTime())
|
||||
|
||||
grossini:runAction(cc.RepeatForever:create(seq1))
|
||||
tamara:runAction(cc.RepeatForever:create(seq2))
|
||||
|
@ -323,21 +213,7 @@ local function SpriteEaseSineInOut()
|
|||
local move_ease_back = move_ease:reverse()
|
||||
|
||||
local delay = createSimpleDelayTime()
|
||||
--[[
|
||||
local arr1 = CCArray:create()
|
||||
arr1:addObject(move)
|
||||
arr1:addObject(delay)
|
||||
arr1:addObject(move_back)
|
||||
arr1:addObject(createSimpleDelayTime())
|
||||
]]--
|
||||
local seq1 = cc.Sequence:create(move, delay, move_back, createSimpleDelayTime() )
|
||||
--[[
|
||||
local arr2 = CCArray:create()
|
||||
arr2:addObject(move_ease)
|
||||
arr2:addObject(createSimpleDelayTime())
|
||||
arr2:addObject(move_ease_back)
|
||||
arr2:addObject(createSimpleDelayTime())
|
||||
]]--
|
||||
local seq1 = cc.Sequence:create(move, delay, move_back, createSimpleDelayTime())
|
||||
local seq2 = cc.Sequence:create(move_ease, createSimpleDelayTime(), move_ease_back, createSimpleDelayTime())
|
||||
|
||||
positionForTwo()
|
||||
|
@ -365,29 +241,8 @@ local function SpriteEaseElastic()
|
|||
local move_ease_out_back = move_ease_out:reverse()
|
||||
|
||||
local delay = createSimpleDelayTime()
|
||||
--[[
|
||||
local arr1 = CCArray:create()
|
||||
arr1:addObject(move)
|
||||
arr1:addObject(delay)
|
||||
arr1:addObject(move_back)
|
||||
arr1:addObject(createSimpleDelayTime())
|
||||
]]--
|
||||
local seq1 = cc.Sequence:create(move, delay, move_back, createSimpleDelayTime() )
|
||||
--[[
|
||||
local arr2 = CCArray:create()
|
||||
arr2:addObject(move_ease_in)
|
||||
arr2:addObject(createSimpleDelayTime())
|
||||
arr2:addObject(move_ease_in_back)
|
||||
arr2:addObject(createSimpleDelayTime())
|
||||
]]--
|
||||
local seq2 = cc.Sequence:create(move_ease_in, createSimpleDelayTime(), move_ease_in_back, createSimpleDelayTime())
|
||||
--[[
|
||||
local arr3 = CCArray:create()
|
||||
arr3:addObject(move_ease_out)
|
||||
arr3:addObject(createSimpleDelayTime())
|
||||
arr3:addObject(move_ease_out_back)
|
||||
arr3:addObject(createSimpleDelayTime())
|
||||
]]--
|
||||
local seq3 = cc.Sequence:create(move_ease_out, createSimpleDelayTime(), move_ease_out_back, createSimpleDelayTime())
|
||||
|
||||
grossini:runAction(cc.RepeatForever:create(seq1))
|
||||
|
@ -416,29 +271,8 @@ local function SpriteEaseElasticInOut()
|
|||
local move_ease_inout_back3 = move_ease_inout3:reverse()
|
||||
|
||||
local delay = createSimpleDelayTime()
|
||||
--[[
|
||||
local arr1 = CCArray:create()
|
||||
arr1:addObject(move_ease_inout1)
|
||||
arr1:addObject(delay)
|
||||
arr1:addObject(move_ease_inout_back1)
|
||||
arr1:addObject(createSimpleDelayTime())
|
||||
]]--
|
||||
local seq1 = cc.Sequence:create(move_ease_inout1, delay, move_ease_inout_back1, createSimpleDelayTime())
|
||||
--[[
|
||||
local arr2 = CCArray:create()
|
||||
arr2:addObject(move_ease_inout2)
|
||||
arr2:addObject(createSimpleDelayTime())
|
||||
arr2:addObject(move_ease_inout_back2)
|
||||
arr2:addObject(createSimpleDelayTime())
|
||||
]]--
|
||||
local seq2 = cc.Sequence:create(move_ease_inout2, createSimpleDelayTime(), move_ease_inout_back2, createSimpleDelayTime())
|
||||
--[[
|
||||
local arr3 = CCArray:create()
|
||||
arr3:addObject(move_ease_inout3)
|
||||
arr3:addObject(createSimpleDelayTime())
|
||||
arr3:addObject(move_ease_inout_back3)
|
||||
arr3:addObject(createSimpleDelayTime())
|
||||
]]--
|
||||
local seq3 = cc.Sequence:create(move_ease_inout3, createSimpleDelayTime(), move_ease_inout_back3, createSimpleDelayTime())
|
||||
|
||||
tamara:runAction(cc.RepeatForever:create(seq1))
|
||||
|
@ -465,29 +299,8 @@ local function SpriteEaseBounce()
|
|||
local move_ease_out_back = move_ease_out:reverse()
|
||||
|
||||
local delay = createSimpleDelayTime()
|
||||
--[[
|
||||
local arr1 = CCArray:create()
|
||||
arr1:addObject(move)
|
||||
arr1:addObject(delay)
|
||||
arr1:addObject(move_back)
|
||||
arr1:addObject(createSimpleDelayTime())
|
||||
]]--
|
||||
local seq1 = cc.Sequence:create(move, delay, move_back, createSimpleDelayTime() )
|
||||
--[[
|
||||
local arr2 = CCArray:create()
|
||||
arr2:addObject(move_ease_in)
|
||||
arr2:addObject(createSimpleDelayTime())
|
||||
arr2:addObject(move_ease_in_back)
|
||||
arr2:addObject(createSimpleDelayTime())
|
||||
]]--
|
||||
local seq2 = cc.Sequence:create(move_ease_in, createSimpleDelayTime(), move_ease_in_back, createSimpleDelayTime() )
|
||||
--[[
|
||||
local arr3 = CCArray:create()
|
||||
arr3:addObject(move_ease_out)
|
||||
arr3:addObject(createSimpleDelayTime())
|
||||
arr3:addObject(move_ease_out_back)
|
||||
arr3:addObject(createSimpleDelayTime())
|
||||
]]--
|
||||
local seq2 = cc.Sequence:create(move_ease_in, createSimpleDelayTime(), move_ease_in_back, createSimpleDelayTime())
|
||||
local seq3 = cc.Sequence:create(move_ease_out, createSimpleDelayTime(), move_ease_out_back, createSimpleDelayTime())
|
||||
|
||||
grossini:runAction(cc.RepeatForever:create(seq1))
|
||||
|
@ -511,21 +324,7 @@ local function SpriteEaseBounceInOut()
|
|||
local move_ease_back = move_ease:reverse()
|
||||
|
||||
local delay = createSimpleDelayTime()
|
||||
--[[
|
||||
local arr1 = CCArray:create()
|
||||
arr1:addObject(move)
|
||||
arr1:addObject(delay)
|
||||
arr1:addObject(move_back)
|
||||
arr1:addObject(createSimpleDelayTime())
|
||||
]]--
|
||||
local seq1 = cc.Sequence:create(move, delay, move_back, createSimpleDelayTime())
|
||||
--[[
|
||||
local arr2 = CCArray:create()
|
||||
arr2:addObject(move_ease)
|
||||
arr2:addObject(createSimpleDelayTime())
|
||||
arr2:addObject(move_ease_back)
|
||||
arr2:addObject(createSimpleDelayTime())
|
||||
]]--
|
||||
local seq2 = cc.Sequence:create(move_ease, createSimpleDelayTime(), move_ease_back, createSimpleDelayTime())
|
||||
|
||||
positionForTwo()
|
||||
|
@ -553,29 +352,8 @@ local function SpriteEaseBack()
|
|||
local move_ease_out_back = move_ease_out:reverse()
|
||||
|
||||
local delay = createSimpleDelayTime()
|
||||
--[[
|
||||
local arr1 = CCArray:create()
|
||||
arr1:addObject(move)
|
||||
arr1:addObject(delay)
|
||||
arr1:addObject(move_back)
|
||||
arr1:addObject(createSimpleDelayTime())
|
||||
]]--
|
||||
local seq1 = cc.Sequence:create(move, delay, move_back, createSimpleDelayTime())
|
||||
--[[
|
||||
local arr2 = CCArray:create()
|
||||
arr2:addObject(move_ease_in)
|
||||
arr2:addObject(createSimpleDelayTime())
|
||||
arr2:addObject(move_ease_in_back)
|
||||
arr2:addObject(createSimpleDelayTime())
|
||||
]]--
|
||||
local seq2 = cc.Sequence:create(move_ease_in, createSimpleDelayTime(), move_ease_in_back, createSimpleDelayTime())
|
||||
--[[
|
||||
local arr3 = CCArray:create()
|
||||
arr3:addObject(move_ease_out)
|
||||
arr3:addObject(createSimpleDelayTime())
|
||||
arr3:addObject(move_ease_out_back)
|
||||
arr3:addObject(createSimpleDelayTime())
|
||||
]]--
|
||||
local seq3 = cc.Sequence:create(move_ease_out, createSimpleDelayTime(), move_ease_out_back, createSimpleDelayTime())
|
||||
|
||||
grossini:runAction(cc.RepeatForever:create(seq1))
|
||||
|
@ -599,21 +377,7 @@ local function SpriteEaseBackInOut()
|
|||
local move_ease_back = move_ease:reverse()
|
||||
|
||||
local delay = createSimpleDelayTime()
|
||||
--[[
|
||||
local arr1 = CCArray:create()
|
||||
arr1:addObject(move)
|
||||
arr1:addObject(delay)
|
||||
arr1:addObject(move_back)
|
||||
arr1:addObject(createSimpleDelayTime())
|
||||
]]--
|
||||
local seq1 = cc.Sequence:create(move, delay, move_back, createSimpleDelayTime())
|
||||
--[[
|
||||
local arr2 = CCArray:create()
|
||||
arr2:addObject(move_ease)
|
||||
arr2:addObject(createSimpleDelayTime())
|
||||
arr2:addObject(move_ease_back)
|
||||
arr2:addObject(createSimpleDelayTime())
|
||||
]]--
|
||||
local seq2 = cc.Sequence:create(move_ease,createSimpleDelayTime(), move_ease_back, createSimpleDelayTime())
|
||||
|
||||
positionForTwo()
|
||||
|
|
|
@ -184,12 +184,6 @@ local function SpriteProgressBarTintAndFade()
|
|||
Helper.initWithLayer(layer)
|
||||
|
||||
local to = cc.ProgressTo:create(6, 100)
|
||||
--[[
|
||||
local array = CCArray:create()
|
||||
array:addObject(CCTintTo:create(1, 255, 0, 0))
|
||||
array:addObject(CCTintTo:create(1, 0, 255, 0))
|
||||
array:addObject(CCTintTo:create(1, 0, 0, 255))
|
||||
]]--
|
||||
local tint = cc.Sequence:create(cc.TintTo:create(1, 255, 0, 0), cc.TintTo:create(1, 0, 255, 0), cc.TintTo:create(1, 0, 0, 255))
|
||||
local fade = cc.Sequence:create(cc.FadeTo:create(1.0, 0),cc.FadeTo:create(1.0, 255))
|
||||
local left = cc.ProgressTimer:create(cc.Sprite:create(s_pPathSister1))
|
||||
|
|
|
@ -289,14 +289,6 @@ local function ActionCardinalSpline()
|
|||
initWithLayer(layer)
|
||||
|
||||
centerSprites(2)
|
||||
--[[
|
||||
local array = cc.pArray:create(20)
|
||||
array:addControlPoint(cc.p(0, 0))
|
||||
array:addControlPoint(cc.p(size.width / 2 - 30, 0))
|
||||
array:addControlPoint(cc.p(size.width / 2 - 30, size.height - 80))
|
||||
array:addControlPoint(cc.p(0, size.height - 80))
|
||||
array:addControlPoint(cc.p(0, 0))
|
||||
]]--
|
||||
local array = {
|
||||
cc.p(0, 0),
|
||||
cc.p(size.width / 2 - 30, 0),
|
||||
|
@ -353,16 +345,6 @@ local function ActionCatmullRom()
|
|||
centerSprites(2)
|
||||
|
||||
tamara:setPosition(cc.p(50, 50))
|
||||
--[[
|
||||
local array = cc.pArray:create(20)
|
||||
array:addControlPoint(cc.p(0, 0))
|
||||
array:addControlPoint(cc.p(80, 80))
|
||||
array:addControlPoint(cc.p(size.width - 80, 80))
|
||||
array:addControlPoint(cc.p(size.width - 80, size.height - 80))
|
||||
array:addControlPoint(cc.p(80, size.height - 80))
|
||||
array:addControlPoint(cc.p(80, 80))
|
||||
array:addControlPoint(cc.p(size.width / 2, size.height / 2))
|
||||
]]--
|
||||
local array = {
|
||||
cc.p(0, 0),
|
||||
cc.p(80, 80),
|
||||
|
@ -377,14 +359,7 @@ local function ActionCatmullRom()
|
|||
local reverse = action:reverse()
|
||||
local seq = cc.Sequence:create(action, reverse)
|
||||
tamara:runAction(seq)
|
||||
--[[
|
||||
local array2 = cc.pArray:create(20)
|
||||
array2:addControlPoint(cc.p(size.width / 2, 30))
|
||||
array2:addControlPoint(cc.p(size.width -80, 30))
|
||||
array2:addControlPoint(cc.p(size.width - 80, size.height - 80))
|
||||
array2:addControlPoint(cc.p(size.width / 2, size.height - 80))
|
||||
array2:addControlPoint(cc.p(size.width / 2, 30))
|
||||
]]--
|
||||
|
||||
local array2 = {
|
||||
cc.p(size.width / 2, 30),
|
||||
cc.p(size.width -80, 30),
|
||||
|
@ -640,16 +615,6 @@ local function ActionSequence2()
|
|||
alignSpritesLeft(1)
|
||||
|
||||
grossini:setVisible(false)
|
||||
--[[
|
||||
local array = cc.Array:create()
|
||||
array:addObject(cc.Place:create(cc.p(200,200)))
|
||||
array:addObject(cc.Show:create())
|
||||
array:addObject(cc.MoveBy:create(1, cc.p(100,0)))
|
||||
array:addObject(cc.CallFunc:create(ActionSequenceCallback1))
|
||||
array:addObject(cc.CallFunc:create(ActionSequenceCallback2))
|
||||
array:addObject(cc.CallFunc:create(ActionSequenceCallback3))
|
||||
]]--
|
||||
|
||||
local action = cc.Sequence:create(cc.Place:create(cc.p(200,200)),cc.Show:create(),cc.MoveBy:create(1, cc.p(100,0)), cc.CallFunc:create(ActionSequenceCallback1),cc.CallFunc:create(ActionSequenceCallback2),cc.CallFunc:create(ActionSequenceCallback3))
|
||||
|
||||
grossini:runAction(action)
|
||||
|
@ -707,12 +672,6 @@ local function ActionDelaytime()
|
|||
alignSpritesLeft(1)
|
||||
|
||||
local move = cc.MoveBy:create(1, cc.p(150,0))
|
||||
--[[
|
||||
local array = cc.Array:create()
|
||||
array:addObject(move)
|
||||
array:addObject(cc.DelayTime:create(2))
|
||||
array:addObject(move)
|
||||
]]--
|
||||
local action = cc.Sequence:create(move, cc.DelayTime:create(2), move)
|
||||
|
||||
grossini:runAction(action)
|
||||
|
@ -854,19 +813,7 @@ local function ActionCallFunc()
|
|||
local action = cc.Sequence:create(
|
||||
cc.MoveBy:create(2, cc.p(200,0)),
|
||||
cc.CallFunc:create(CallFucnCallback1) )
|
||||
--[[
|
||||
local array = cc.Array:create()
|
||||
array:addObject(cc.ScaleBy:create(2, 2))
|
||||
array:addObject(cc.FadeOut:create(2))
|
||||
array:addObject(cc.CallFunc:create(CallFucnCallback2))
|
||||
]]--
|
||||
local action2 = cc.Sequence:create(cc.ScaleBy:create(2, 2),cc.FadeOut:create(2),cc.CallFunc:create(CallFucnCallback2))
|
||||
--[[
|
||||
local array2 = cc.Array:create()
|
||||
array2:addObject(cc.RotateBy:create(3 , 360))
|
||||
array2:addObject(cc.FadeOut:create(2))
|
||||
array2:addObject(cc.CallFunc:create(CallFucnCallback3))
|
||||
]]--
|
||||
local action3 = cc.Sequence:create(cc.RotateBy:create(3 , 360),cc.FadeOut:create(2),cc.CallFunc:create(CallFucnCallback3))
|
||||
|
||||
grossini:runAction(action)
|
||||
|
@ -905,12 +852,6 @@ local function ActionReverseSequence()
|
|||
|
||||
local move1 = cc.MoveBy:create(1, cc.p(250,0))
|
||||
local move2 = cc.MoveBy:create(1, cc.p(0,50))
|
||||
--[[
|
||||
local array = cc.Array:create()
|
||||
array:addObject(move1)
|
||||
array:addObject(move2)
|
||||
array:addObject(move1:reverse())
|
||||
]]--
|
||||
local seq = cc.Sequence:create(move1, move2, move1:reverse())
|
||||
local action = cc.Sequence:create(seq, seq:reverse())
|
||||
|
||||
|
@ -935,14 +876,6 @@ local function ActionReverseSequence2()
|
|||
local move2 = cc.MoveBy:create(1, cc.p(0,50))
|
||||
local tog1 = cc.ToggleVisibility:create()
|
||||
local tog2 = cc.ToggleVisibility:create()
|
||||
--[[
|
||||
local array = cc.Array:createWithCapacity(10)
|
||||
array:addObject(move1)
|
||||
array:addObject(tog1)
|
||||
array:addObject(move2)
|
||||
array:addObject(tog2)
|
||||
array:addObject(move1:reverse())
|
||||
]]--
|
||||
local seq = cc.Sequence:create(move1, tog1, move2, tog2, move1:reverse())
|
||||
local action = cc.Repeat:create(cc.Sequence:create(seq, seq:reverse()), 3)
|
||||
|
||||
|
@ -953,12 +886,7 @@ local function ActionReverseSequence2()
|
|||
local move_tamara = cc.MoveBy:create(1, cc.p(100,0))
|
||||
local move_tamara2 = cc.MoveBy:create(1, cc.p(50,0))
|
||||
local hide = cc.Hide:create()
|
||||
--[[
|
||||
local array2 = cc.Array:createWithCapacity(10)
|
||||
array2:addObject(move_tamara)
|
||||
array2:addObject(hide)
|
||||
array2:addObject(move_tamara2)
|
||||
]]--
|
||||
|
||||
local seq_tamara = cc.Sequence:create(move_tamara, hide, move_tamara2)
|
||||
local seq_back = seq_tamara:reverse()
|
||||
tamara:runAction(cc.Sequence:create(seq_tamara, seq_back))
|
||||
|
@ -1056,13 +984,6 @@ local function ActionTargeted()
|
|||
|
||||
local t1 = cc.TargetedAction:create(kathia, jump2)
|
||||
local t2 = cc.TargetedAction:create(kathia, rot2)
|
||||
--[[
|
||||
local array = cc.Array:createWithCapacity(10)
|
||||
array:addObject(jump1)
|
||||
array:addObject(t1)
|
||||
array:addObject(rot1)
|
||||
array:addObject(t2)
|
||||
]]--
|
||||
local seq = cc.Sequence:create(jump1, t1, rot1, t2)
|
||||
local always = cc.RepeatForever:create(seq)
|
||||
|
||||
|
@ -1214,17 +1135,6 @@ local function ActionIssue1305_2()
|
|||
local act6 = cc.CallFunc:create(Issue1305_2_log3)
|
||||
local act7 = cc.MoveBy:create(2, cc.p(-100, 0))
|
||||
local act8 = cc.CallFunc:create(Issue1305_2_log4)
|
||||
--[[
|
||||
local array = cc.Array:create()
|
||||
array:addObject(act1)
|
||||
array:addObject(act2)
|
||||
array:addObject(act3)
|
||||
array:addObject(act4)
|
||||
array:addObject(act5)
|
||||
array:addObject(act6)
|
||||
array:addObject(act7)
|
||||
array:addObject(act8)
|
||||
]]--
|
||||
local actF = cc.Sequence:create(act1, act2, act3, act4, act5, act6, act7, act8)
|
||||
|
||||
cc.Director:getInstance():getActionManager():addAction(actF ,spr, false)
|
||||
|
@ -1306,18 +1216,6 @@ local function ActionIssue1327()
|
|||
local act7 = cc.CallFunc:create(logSprRotation)
|
||||
local act8 = cc.RotateBy:create(0.25, 45)
|
||||
local act9 = cc.CallFunc:create(logSprRotation)
|
||||
--[[
|
||||
local array = cc.Array:create()
|
||||
array:addObject(act1)
|
||||
array:addObject(act2)
|
||||
array:addObject(act3)
|
||||
array:addObject(act4)
|
||||
array:addObject(act5)
|
||||
array:addObject(act6)
|
||||
array:addObject(act7)
|
||||
array:addObject(act8)
|
||||
array:addObject(act9)
|
||||
]]--
|
||||
spr:runAction(cc.Sequence:create(act1, act2, act3, act4, act5, act6, act7,act8, act9))
|
||||
|
||||
Helper.titleLabel:setString("Issue 1327")
|
||||
|
|
|
@ -69,17 +69,12 @@ local function BugTest422()
|
|||
pMenuItem1:registerScriptTapHandler(menuCallback)
|
||||
local pMenuItem2 = cc.MenuItemFont:create("Two")
|
||||
pMenuItem2:registerScriptTapHandler(menuCallback)
|
||||
--[[
|
||||
local arr = cc.Array:create()
|
||||
arr:addObject(pMenuItem1)
|
||||
arr:addObject(pMenuItem2)
|
||||
]]--
|
||||
local pMenu = cc.Menu:create(pMenuItem1, pMenuItem2)
|
||||
pMenu:alignItemsVertically()
|
||||
local fX = math.random() * 50
|
||||
local fY = math.random() * 50
|
||||
local menuPos = pMenu:getPosition()
|
||||
pMenu:setPosition(cc.p(menuPos.x + fX,menuPos.y + fY))
|
||||
local menuPosX ,menuPosY = pMenu:getPosition()
|
||||
pMenu:setPosition(cc.p(menuPosX + fX,menuPosY + fY))
|
||||
pResetLayer:addChild(pMenu,0,nLocalTag)
|
||||
end
|
||||
|
||||
|
@ -117,8 +112,7 @@ local function BugTest458()
|
|||
pCorner:setPosition(cc.p(-(nWidth / 2 + pCorner:getContentSize().width / 2), -(nHeight / 2 + pCorner:getContentSize().height / 2)));
|
||||
pSprite:addChild(pCorner);
|
||||
|
||||
local posCorner = pCorner:getPosition()
|
||||
local nX,nY = posCorner.x,posCorner.y
|
||||
local nX,nY = pCorner:getPosition()
|
||||
local pCorner2 = cc.Sprite:create("Images/bugs/corner.png");
|
||||
pCorner2:setPosition(cc.p(-nX, nY));
|
||||
pCorner2:setFlipX(true);
|
||||
|
@ -178,11 +172,6 @@ local function BugTest458()
|
|||
local pLayerColor2 = cc.LayerColor:create(cc.c4b(255,0,0,255), 100, 100);
|
||||
local pMenuItemSprite2 = cc.MenuItemSprite:create(pLayerColor1, pLayerColor2);
|
||||
pMenuItemSprite2:registerScriptTapHandler(menuCallback)
|
||||
--[[
|
||||
local arr = cc.Array:create()
|
||||
arr:addObject(pMenuItemSprite)
|
||||
arr:addObject(pMenuItemSprite2)
|
||||
]]--
|
||||
local pMenu = cc.Menu:create(pMenuItemSprite, pMenuItemSprite2)
|
||||
pMenu:alignItemsVerticallyWithPadding(100);
|
||||
pMenu:setPosition(cc.p(Winsize.width / 2, Winsize.height / 2));
|
||||
|
@ -380,12 +369,6 @@ local function BugTest1159()
|
|||
sprite_a:ignoreAnchorPointForPosition(false)
|
||||
sprite_a:setPosition(cc.p(0.0, Winsize.height/2))
|
||||
pLayer:addChild(sprite_a)
|
||||
|
||||
--[[
|
||||
local arr = cc.Array:create()
|
||||
arr:addObject(cc.MoveTo:create(1.0, cc.p(1024.0, 384.0)))
|
||||
arr:addObject(cc.MoveTo:create(1.0, cc.p(0.0, 384.0)))
|
||||
]]--
|
||||
local seq = cc.Sequence:create(cc.MoveTo:create(1.0, cc.p(1024.0, 384.0)), cc.MoveTo:create(1.0, cc.p(0.0, 384.0)))
|
||||
sprite_a:runAction(cc.RepeatForever:create(seq))
|
||||
|
||||
|
@ -430,13 +413,13 @@ local function BugTest1174()
|
|||
local pLayer = cc.Layer:create()
|
||||
|
||||
local function check_for_error(p1,p2,p3,p4,s,t)
|
||||
local p4_p3 = cc.p.__sub(p4,p3)
|
||||
local p4_p3_t = cc.p.__mul(p4_p3,t)
|
||||
local hitp1 = cc.p.__add(p3,p4_p3_t)
|
||||
local p4_p3 = cc.pSub(p4,p3)
|
||||
local p4_p3_t = cc.pMul(p4_p3,t)
|
||||
local hitp1 = cc.pAdd(p3,p4_p3_t)
|
||||
|
||||
local p2_p1 = cc.p.__sub(p2,p1)
|
||||
local p2_p1_s = cc.p.__mul(p2_p1,s)
|
||||
local hitp2 = cc.p.__add(p1,p2_p1_s)
|
||||
local p2_p1 = cc.pSub(p2,p1)
|
||||
local p2_p1_s = cc.pMul(p2_p1,s)
|
||||
local hitp2 = cc.pAdd(p1,p2_p1_s)
|
||||
|
||||
if math.abs(hitp1.x - hitp2.x ) > 0.1 or math.abs(hitp1.y - hitp2.y) > 0.1 then
|
||||
local strErr = "ERROR: ("..hitp1.x..","..hitp1.y..") != ("..hitp2.x..","..hitp2.y..")"
|
||||
|
@ -491,7 +474,7 @@ local function BugTest1174()
|
|||
C = cc.p(cx,cy)
|
||||
D = cc.p(dx,dy)
|
||||
|
||||
bRet,s,t = cc.p:isLineIntersect( A, D, B, C, s, t)
|
||||
bRet,s,t = cc.pIsLineIntersect( A, D, B, C, s, t)
|
||||
if true == bRet then
|
||||
if 1 == check_for_error(A,D,B,C,s,t) then
|
||||
err = err + 1
|
||||
|
@ -513,7 +496,7 @@ local function BugTest1174()
|
|||
p4 = cc.p(186,416);
|
||||
s = 0.0;
|
||||
t = 0.0;
|
||||
bRet,s,t = cc.p:isLineIntersect( p1, p2, p3, p4, s, t)
|
||||
bRet,s,t = cc.pIsLineIntersect( p1, p2, p3, p4, s, t)
|
||||
if true == bRet then
|
||||
check_for_error(p1, p2, p3, p4, s, t)
|
||||
end
|
||||
|
@ -558,7 +541,7 @@ local function BugTest1174()
|
|||
|
||||
s = 0.0
|
||||
t = 0.0
|
||||
bRet,s,t = cc.p:isLineIntersect(p1, p2, p3, p4, s, t)
|
||||
bRet,s,t = cc.pIsLineIntersect(p1, p2, p3, p4, s, t)
|
||||
if true == bRet then
|
||||
if 1 == check_for_error(p1, p2, p3, p4, s,t ) then
|
||||
err = err + 1
|
||||
|
@ -635,8 +618,7 @@ local function BugsTestMainLayer()
|
|||
|
||||
local function onTouchMoved(x, y)
|
||||
local nMoveY = y - ptBeginPos.y
|
||||
local curPos = pItemMenu:getPosition()
|
||||
local curPosx, curPosy = curPos.x,curPos.y
|
||||
local curPosx, curPosy = pItemMenu:getPosition()
|
||||
local nextPosy = curPosy + nMoveY
|
||||
if nextPosy < 0 then
|
||||
pItemMenu:setPosition(0, 0)
|
||||
|
|
|
@ -21,8 +21,7 @@ local function initWithLayer()
|
|||
local s = layer:getChildByTag(kTagSprite)
|
||||
s:stopAllActions()
|
||||
s:runAction(cc.MoveTo:create(1, cc.p(x, y)))
|
||||
local pos = s:getPosition()
|
||||
local posX, posY = pos.x,pos.y
|
||||
local posX, posY = s:getPosition()
|
||||
local o = x - posX
|
||||
local a = y - posY
|
||||
local at = math.atan(o / a) / math.pi * 180.0
|
||||
|
|
|
@ -138,8 +138,7 @@ local function CocosDenshionTest()
|
|||
elseif eventType == "moved" then
|
||||
local touchLocation = cc.p(x, y)
|
||||
local nMoveY = touchLocation.y - m_tBeginPos.y
|
||||
local curPos = m_pItmeMenu:getPosition()
|
||||
local curPosX, curPosY = curPos.x,curPos.y
|
||||
local curPosX, curPosY = m_pItmeMenu:getPosition()
|
||||
local curPos = cc.p(curPosX, curPosY)
|
||||
local nextPos = cc.p(curPos.x, curPos.y + nMoveY)
|
||||
|
||||
|
|
|
@ -40,9 +40,9 @@ local function setEnableRecursiveCascading(node, enable)
|
|||
return
|
||||
end
|
||||
|
||||
if node.__CCRGBAProtocol__ ~= nil then
|
||||
node.__CCRGBAProtocol__:setCascadeColorEnabled(enable)
|
||||
node.__CCRGBAProtocol__:setCascadeOpacityEnabled(enable)
|
||||
if node.setCascadeColorEnabled ~= nil and node.setCascadeOpacityEnabled ~= nil then
|
||||
node:setCascadeColorEnabled(enable)
|
||||
node:setCascadeOpacityEnabled(enable)
|
||||
end
|
||||
|
||||
local obj = nil
|
||||
|
@ -56,9 +56,7 @@ local function setEnableRecursiveCascading(node, enable)
|
|||
local i = 0
|
||||
local len = table.getn(children)
|
||||
for i = 0, len-1, 1 do
|
||||
print("come in")
|
||||
local child = tolua.cast(children[i + 1], "Node")
|
||||
setEnableRecursiveCascading(child, enable)
|
||||
setEnableRecursiveCascading(children[i + 1], enable)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -164,8 +164,7 @@ local function MenuLayerMainMenu()
|
|||
break
|
||||
end
|
||||
child = tolua.cast(pObject, "Node")
|
||||
local dstPoint = child:getPosition()
|
||||
local dstPointX, dstPointY = dstPoint.x,dstPoint.y
|
||||
local dstPointX, dstPointY = child:getPosition()
|
||||
local offset = s.width/2 + 50
|
||||
if i % 2 == 0 then
|
||||
offset = 0-offset
|
||||
|
@ -217,14 +216,12 @@ local function MenuLayer2()
|
|||
if i==0 then
|
||||
-- TIP: if no padding, padding = 5
|
||||
menu:alignItemsHorizontally()
|
||||
local menuPos = menu:getPosition()
|
||||
local x, y = menuPos.x,menuPos.y
|
||||
local x, y = menu:getPosition()
|
||||
menu:setPosition( cc.pAdd(cc.p(x, y), cc.p(0,30)) )
|
||||
else
|
||||
-- TIP: but padding is configurable
|
||||
menu:alignItemsHorizontallyWithPadding(40)
|
||||
local menuPos = menu:getPosition()
|
||||
local x, y = menuPos.x,menuPos.y
|
||||
local x, y = menu:getPosition()
|
||||
menu:setPosition( cc.pSub(cc.p(x, y), cc.p(0,30)) )
|
||||
end
|
||||
end
|
||||
|
@ -238,14 +235,12 @@ local function MenuLayer2()
|
|||
if i==0 then
|
||||
-- TIP: if no padding, padding = 5
|
||||
menu:alignItemsVertically()
|
||||
local menuPos = menu:getPosition()
|
||||
local x, y = menuPos.x,menuPos.y
|
||||
local x, y = menu:getPosition()
|
||||
menu:setPosition( cc.pAdd(cc.p(x, y), cc.p(100,0)) )
|
||||
else
|
||||
-- TIP: but padding is configurable
|
||||
menu:alignItemsVerticallyWithPadding(40)
|
||||
local menuPos = menu:getPosition()
|
||||
local x, y = menuPos.x,menuPos.y
|
||||
local x, y = menu:getPosition()
|
||||
menu:setPosition( cc.pSub(cc.p(x, y), cc.p(100,0)) )
|
||||
end
|
||||
end
|
||||
|
@ -302,8 +297,7 @@ local function MenuLayer2()
|
|||
menu:setTag( kTagMenu )
|
||||
|
||||
ret:addChild(menu, 0, 100+i)
|
||||
local menuPos = menu:getPosition()
|
||||
local x, y = menuPos.x,menuPos.y
|
||||
local x, y = menu:getPosition()
|
||||
m_centeredMenu = cc.p(x, y)
|
||||
end
|
||||
|
||||
|
|
|
@ -148,8 +148,7 @@ local function OpenGLTestMainLayer()
|
|||
local len = table.getn(children)
|
||||
for i= 0 ,len - 1 do
|
||||
local child = tolua.cast(children[i + 1], "Sprite")
|
||||
local oldPos = child:getPosition()
|
||||
local oldPosX,oldPosY = oldPos.x, oldPos.y
|
||||
local oldPosX,oldPosY = child:getPosition()
|
||||
child:setPosition(oldPosX,math.sin(accum * 2 + i / 2.0) * 20)
|
||||
local scaleY = math.sin(accum * 2 + i / 2.0 + 0.707)
|
||||
child:setScaleY(scaleY)
|
||||
|
|
|
@ -487,8 +487,7 @@ local function DemoFire()
|
|||
background:addChild(emitter, 10)
|
||||
|
||||
emitter:setTexture(cc.TextureCache:getInstance():addImage(s_fire))
|
||||
local pos = emitter:getPosition()
|
||||
local pos_x, pos_y = pos.x, pos.y
|
||||
local pos_x, pos_y = emitter:getPosition()
|
||||
emitter:setPosition(pos_x, 100)
|
||||
|
||||
titleLabel:setString("ParticleFire")
|
||||
|
@ -505,8 +504,7 @@ local function DemoSmoke()
|
|||
-- emitter:retain()
|
||||
background:addChild(emitter, 10)
|
||||
emitter:setTexture(cc.TextureCache:getInstance():addImage(s_fire))
|
||||
local pos = emitter:getPosition()
|
||||
local pos_x, pos_y = pos.x, pos.y
|
||||
local pos_x, pos_y = emitter:getPosition()
|
||||
emitter:setPosition(pos_x, 100)
|
||||
|
||||
setEmitterPosition()
|
||||
|
@ -544,8 +542,7 @@ local function DemoSnow()
|
|||
emitter = cc.ParticleSnow:create()
|
||||
-- emitter:retain()
|
||||
background:addChild(emitter, 10)
|
||||
local pos = emitter:getPosition()
|
||||
local pos_x, pos_y = pos.x, pos.y
|
||||
local pos_x, pos_y = emitter:getPosition()
|
||||
emitter:setPosition(pos_x, pos_y - 110)
|
||||
emitter:setLife(3)
|
||||
emitter:setLifeVar(1)
|
||||
|
@ -586,8 +583,7 @@ local function DemoRain()
|
|||
emitter = cc.ParticleRain:create()
|
||||
-- emitter:retain()
|
||||
background:addChild(emitter, 10)
|
||||
local pos = emitter:getPosition()
|
||||
local pos_x, pos_y = pos.x, pos.y
|
||||
local pos_x, pos_y = emitter:getPosition()
|
||||
emitter:setPosition(pos_x, pos_y - 100)
|
||||
emitter:setLife(4)
|
||||
|
||||
|
|
|
@ -816,7 +816,7 @@ local function TMXIsoZorder()
|
|||
m_tamara:runAction( cc.RepeatForever:create(seq) )
|
||||
|
||||
local function repositionSprite(dt)
|
||||
local p = m_tamara:getPosition()
|
||||
local p = cc.p(m_tamara:getPosition())
|
||||
p = CC_POINT_POINTS_TO_PIXELS(p)
|
||||
local map = ret:getChildByTag(kTagTileMap)
|
||||
|
||||
|
@ -874,7 +874,7 @@ local function TMXOrthoZorder()
|
|||
m_tamara:runAction( cc.RepeatForever:create(seq))
|
||||
|
||||
local function repositionSprite(dt)
|
||||
local p = m_tamara:getPosition()
|
||||
local p = cc.p(m_tamara:getPosition())
|
||||
p = CC_POINT_POINTS_TO_PIXELS(p)
|
||||
local map = ret:getChildByTag(kTagTileMap)
|
||||
|
||||
|
@ -935,7 +935,7 @@ local function TMXIsoVertexZ()
|
|||
|
||||
-- tile height is 64x32
|
||||
-- map size: 30x30
|
||||
local p = m_tamara:getPosition()
|
||||
local p = cc.p(m_tamara:getPosition())
|
||||
p = CC_POINT_POINTS_TO_PIXELS(p)
|
||||
local newZ = -(p.y+32) /16
|
||||
m_tamara:setVertexZ( newZ )
|
||||
|
@ -991,7 +991,7 @@ local function TMXOrthoVertexZ()
|
|||
local function repositionSprite(dt)
|
||||
-- tile height is 101x81
|
||||
-- map size: 12x12
|
||||
local p = m_tamara:getPosition()
|
||||
local p = cc.p(m_tamara:getPosition())
|
||||
p = CC_POINT_POINTS_TO_PIXELS(p)
|
||||
m_tamara:setVertexZ( -( (p.y+81) /81) )
|
||||
end
|
||||
|
|
|
@ -162,8 +162,7 @@ function CreateTestMenu()
|
|||
|
||||
local function onTouchMoved(x, y)
|
||||
local nMoveY = y - BeginPos.y
|
||||
local curPos = MainMenu:getPosition()
|
||||
local curPosx, curPosy = curPos.x,curPos.y
|
||||
local curPosx, curPosy = MainMenu:getPosition()
|
||||
local nextPosy = curPosy + nMoveY
|
||||
local winSize = cc.Director:getInstance():getWinSize()
|
||||
if nextPosy < 0 then
|
||||
|
|
|
@ -51,6 +51,7 @@ extern "C" {
|
|||
#include "lua_cocos2dx_manual.hpp"
|
||||
#include "LuaBasicConversions.h"
|
||||
#include "lua_cocos2dx_extension_manual.h"
|
||||
#include "lua_cocos2dx_deprecated.h"
|
||||
|
||||
namespace {
|
||||
int lua_print(lua_State * luastate)
|
||||
|
@ -130,10 +131,12 @@ bool LuaStack::init(void)
|
|||
g_luaType.clear();
|
||||
register_all_cocos2dx(_state);
|
||||
register_all_cocos2dx_extension(_state);
|
||||
register_all_cocos2dx_deprecated(_state);
|
||||
register_cocos2dx_extension_CCBProxy(_state);
|
||||
tolua_opengl_open(_state);
|
||||
register_all_cocos2dx_manual(_state);
|
||||
register_all_cocos2dx_extension_manual(_state);
|
||||
register_all_cocos2dx_manual_deprecated(_state);
|
||||
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_MAC)
|
||||
LuaObjcBridge::luaopen_luaoc(_state);
|
||||
#endif
|
||||
|
|
|
@ -1115,11 +1115,12 @@ void fontdefinition_to_luaval(lua_State* L,const FontDefinition& inValue)
|
|||
|
||||
void array_to_luaval(lua_State* L,Array* inValue)
|
||||
{
|
||||
lua_newtable(L);
|
||||
|
||||
if (nullptr == L || nullptr == inValue)
|
||||
return;
|
||||
|
||||
Object* obj = nullptr;
|
||||
lua_newtable(L);
|
||||
|
||||
std::string className = "";
|
||||
String* strVal = nullptr;
|
||||
|
@ -1204,11 +1205,12 @@ void array_to_luaval(lua_State* L,Array* inValue)
|
|||
|
||||
void dictionary_to_luaval(lua_State* L, Dictionary* dict)
|
||||
{
|
||||
lua_newtable(L);
|
||||
|
||||
if (nullptr == L || nullptr == dict)
|
||||
return;
|
||||
|
||||
DictElement* element = nullptr;
|
||||
lua_newtable(L);
|
||||
|
||||
std::string className = "";
|
||||
String* strVal = nullptr;
|
||||
|
|
|
@ -1 +1 @@
|
|||
e4cde349657e805611bb37bf5123dac55dad4381
|
||||
451f7b8e8003474fb17be07923476ea2f12a9122
|
|
@ -2065,9 +2065,6 @@ int register_all_cocos2dx(lua_State* tolua_S);
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
f36d9af5f8cb5dd623c2963b6c433e90bbad9570
|
||||
7ec8c685dde8f273f39cb13c8e009d9bca6e0e53
|
|
@ -1 +1 @@
|
|||
99f6cd0f27234a5dc217c264746002c73b30c08e
|
||||
2c817ab849fe61f97c010cf5e9b6528bca2a0396
|
|
@ -0,0 +1 @@
|
|||
6bb676eae227e4e547cbeaea273b5289354d5a89
|
|
@ -0,0 +1,15 @@
|
|||
#ifndef COCOS2DX_SCRIPT_LUA_COCOS2DX_SUPPORT_LUA_COCOS2DX_DEPRECATED_H
|
||||
#define COCOS2DX_SCRIPT_LUA_COCOS2DX_SUPPORT_LUA_COCOS2DX_DEPRECATED_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#include "tolua++.h"
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
TOLUA_API int register_all_cocos2dx_deprecated(lua_State* tolua_S);
|
||||
TOLUA_API int register_all_cocos2dx_manual_deprecated(lua_State* tolua_S);
|
||||
|
||||
#endif // #ifndef COCOS2DX_SCRIPT_LUA_COCOS2DX_SUPPORT_LUA_COCOS2DX_DEPRECATED_H
|
|
@ -1172,6 +1172,56 @@ tolua_lerror:
|
|||
#endif
|
||||
}
|
||||
|
||||
static int tolua_cocos2d_Node_getPosition(lua_State* tolua_S)
|
||||
{
|
||||
if (NULL == tolua_S)
|
||||
return 0;
|
||||
|
||||
int argc = 0;
|
||||
Node* self = nullptr;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
if (!tolua_isusertype(tolua_S,1,"Node",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
self = static_cast<cocos2d::Node*>(tolua_tousertype(tolua_S,1,0));
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (nullptr == self) {
|
||||
tolua_error(tolua_S,"invalid 'self' in function 'tolua_cocos2d_Node_getPosition'\n", NULL);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S) - 1;
|
||||
|
||||
if (argc >= 0 && argc <= 2)
|
||||
{
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isnumber(tolua_S,2,1,&tolua_err) || !tolua_isnumber(tolua_S,3,1,&tolua_err) )
|
||||
goto tolua_lerror;
|
||||
#endif
|
||||
float x = (float) tolua_tonumber(tolua_S,2,0);
|
||||
float y = (float) tolua_tonumber(tolua_S,3,0);
|
||||
|
||||
self->getPosition(&x,&y);
|
||||
|
||||
tolua_pushnumber(tolua_S,(lua_Number)x);
|
||||
tolua_pushnumber(tolua_S,(lua_Number)y);
|
||||
|
||||
return 2;
|
||||
}
|
||||
|
||||
CCLOG("'getPosition' function in Node has wrong number of arguments: %d, was expecting %d\n", argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'getPosition'.",&tolua_err);
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
static int tolua_cocos2d_Spawn_create(lua_State* tolua_S)
|
||||
{
|
||||
if (NULL == tolua_S)
|
||||
|
@ -2356,6 +2406,9 @@ static void extendNode(lua_State* tolua_S)
|
|||
lua_pushstring(tolua_S,"unscheduleUpdate");
|
||||
lua_pushcfunction(tolua_S,tolua_cocos2d_Node_unscheduleUpdate);
|
||||
lua_rawset(tolua_S, -3);
|
||||
lua_pushstring(tolua_S,"getPosition");
|
||||
lua_pushcfunction(tolua_S,tolua_cocos2d_Node_getPosition);
|
||||
lua_rawset(tolua_S, -3);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ function cc.pForAngle(a)
|
|||
end
|
||||
|
||||
function cc.pGetLength(pt)
|
||||
return math.sqrt( pt.x * pt.x + pt.y * pt.y );
|
||||
return math.sqrt( pt.x * pt.x + pt.y * pt.y )
|
||||
end
|
||||
|
||||
function cc.pNormalize(pt)
|
||||
|
@ -68,6 +68,36 @@ function cc.pGetDistance(startP,endP)
|
|||
return cc.pGetLength(cc.pSub(startP,endP))
|
||||
end
|
||||
|
||||
function cc.pIsLineIntersect(A, B, C, D, s, t)
|
||||
if ((A.x == B.x) and (A.y == B.y)) or ((C.x == D.x) and (C.y == D.y))then
|
||||
return false, s, t
|
||||
end
|
||||
|
||||
local BAx = B.x - A.x
|
||||
local BAy = B.y - A.y
|
||||
local DCx = D.x - C.x
|
||||
local DCy = D.y - C.y
|
||||
local ACx = A.x - C.x
|
||||
local ACy = A.y - C.y
|
||||
|
||||
local denom = DCy * BAx - DCx * BAy
|
||||
s = DCx * ACy - DCy * ACx
|
||||
t = BAx * ACy - BAy * ACx
|
||||
|
||||
if (denom == 0) then
|
||||
if (s == 0 or t == 0) then
|
||||
return true, s , t
|
||||
end
|
||||
|
||||
return false, s, t
|
||||
end
|
||||
|
||||
s = s / denom
|
||||
t = t / denom
|
||||
|
||||
return true,s,t
|
||||
end
|
||||
|
||||
--Size
|
||||
function cc.size( _width,_height )
|
||||
return { width = _width, height = _height }
|
||||
|
@ -97,7 +127,7 @@ function cc.rectGetMidX(rect)
|
|||
end
|
||||
|
||||
function cc.rectGetMinX(rect)
|
||||
return rect.x;
|
||||
return rect.x
|
||||
end
|
||||
|
||||
function cc.rectGetMaxY(rect)
|
||||
|
@ -149,7 +179,7 @@ function cc.rectIntersection( rect1, rect2 )
|
|||
|
||||
intersection.width = math.min(rect1.x + rect1.width, rect2.x + rect2.width) - intersection.x
|
||||
intersection.height = math.min(rect1.y + rect1.height, rect2.y + rect2.height) - intersection.y
|
||||
return intersection;
|
||||
return intersection
|
||||
end
|
||||
|
||||
--Color3B
|
||||
|
|
|
@ -1,8 +1,199 @@
|
|||
require "Cocos2d.lua"
|
||||
--tip
|
||||
local function deprecatedTip(old_name,new_name)
|
||||
print("\n********** \n"..old_name.." was deprecated please use ".. new_name .. " instead.\n**********")
|
||||
end
|
||||
|
||||
--CCDirector class will be Deprecated,begin
|
||||
local function CCDirectorClassDeprecated( )
|
||||
deprecatedTip("CCDirector","cc.Director")
|
||||
return cc.Director
|
||||
end
|
||||
_G["CCDirector"] = CCDirectorClassDeprecated()
|
||||
|
||||
|
||||
--functions of CCDirector will be deprecated,begin
|
||||
local CCDirectorDeprecated = { }
|
||||
function CCDirectorDeprecated.sharedDirector()
|
||||
deprecatedTip("CCDirector:sharedDirector","cc.Director:getInstance")
|
||||
return cc.Director:getInstance()
|
||||
end
|
||||
rawset(CCDirector,"sharedDirector",CCDirectorDeprecated.sharedDirector)
|
||||
|
||||
--functions of CCDirector will be deprecated,end
|
||||
--CCDirector class will be Deprecated,end
|
||||
|
||||
|
||||
--CCTextureCache class will be Deprecated,begin
|
||||
local function CCTextureCacheClassDeprecated( )
|
||||
deprecatedTip("CCTextureCache ","cc.TextureCache")
|
||||
return cc.TextureCache
|
||||
end
|
||||
_G["CCTextureCache"] = CCTextureCacheClassDeprecated()
|
||||
|
||||
--functions of CCTextureCache will be deprecated begin
|
||||
local CCTextureCacheDeprecated = { }
|
||||
function CCTextureCacheDeprecated.sharedTextureCache()
|
||||
deprecatedTip("CCTextureCache:sharedTextureCache","CCTextureCache:getInstance")
|
||||
return cc.TextureCache:getInstance()
|
||||
end
|
||||
rawset(CCTextureCache,"sharedTextureCache",CCTextureCacheDeprecated.sharedTextureCache)
|
||||
|
||||
function CCTextureCacheDeprecated.purgeSharedTextureCache()
|
||||
deprecatedTip("CCTextureCache:purgeSharedTextureCache","CCTextureCache:destroyInstance")
|
||||
return cc.TextureCache:destroyInstance()
|
||||
end
|
||||
rawset(CCTextureCache,"purgeSharedTextureCache",CCTextureCacheDeprecated.purgeSharedTextureCache)
|
||||
--functions of CCTextureCache will be deprecated end
|
||||
--CCTextureCache class will be Deprecated,end
|
||||
|
||||
--CCSpriteFrame class will be Deprecated,begin
|
||||
local function CCSpriteFrameClassDeprecated( )
|
||||
deprecatedTip("CCSpriteFrame ","cc.SpriteFrame")
|
||||
return cc.SpriteFrame
|
||||
end
|
||||
_G["CCSpriteFrame"] = CCSpriteFrameClassDeprecated()
|
||||
|
||||
--CCSpriteFrame class will be Deprecated,end
|
||||
|
||||
--CCSprite class will be Deprecated,begin
|
||||
local function CCSpriteClassDeprecated( )
|
||||
deprecatedTip("CCSprite ","cc.Sprite")
|
||||
return cc.Sprite
|
||||
end
|
||||
_G["CCSprite"] = CCSpriteClassDeprecated()
|
||||
|
||||
--CCSprite class will be Deprecated,end
|
||||
|
||||
--CCAnimation class will be Deprecated,begin
|
||||
local function CCAnimationClassDeprecated( )
|
||||
deprecatedTip("CCAnimation ","cc.Animation")
|
||||
return cc.Animation
|
||||
end
|
||||
_G["CCAnimation"] = CCAnimationClassDeprecated()
|
||||
|
||||
--CCAnimation class will be Deprecated,end
|
||||
|
||||
--CCAnimate class will be Deprecated,begin
|
||||
local function CCAnimateClassDeprecated( )
|
||||
deprecatedTip("CCAnimate ","cc.Animate")
|
||||
return cc.Animate
|
||||
end
|
||||
_G["CCAnimate"] = CCAnimateClassDeprecated()
|
||||
|
||||
--CCAnimate class will be Deprecated,end
|
||||
|
||||
--CCRepeatForever class will be Deprecated,begin
|
||||
local function CCRepeatForeverClassDeprecated( )
|
||||
deprecatedTip("CCRepeatForever ","cc.RepeatForever")
|
||||
return cc.RepeatForever
|
||||
end
|
||||
_G["CCRepeatForever"] = CCRepeatForeverClassDeprecated()
|
||||
|
||||
--CCRepeatForever class will be Deprecated,end
|
||||
|
||||
--CCLayer class will be Deprecated,begin
|
||||
local function CCLayerClassDeprecated( )
|
||||
deprecatedTip("CCLayer ","cc.Layer")
|
||||
return cc.Layer
|
||||
end
|
||||
_G["CCLayer"] = CCLayerClassDeprecated()
|
||||
--CCLayer class will be Deprecated,end
|
||||
|
||||
--CCScene class will be Deprecated,begin
|
||||
local function CCSceneClassDeprecated( )
|
||||
deprecatedTip("CCScene ","cc.Scene")
|
||||
return cc.Scene
|
||||
end
|
||||
_G["CCScene"] = CCSceneClassDeprecated()
|
||||
--CCScene class will be Deprecated,end
|
||||
|
||||
--CCFileUtils class will be Deprecated,begin
|
||||
local function CCFileUtilsClassDeprecated( )
|
||||
deprecatedTip("CCFileUtils ","cc.FileUtils")
|
||||
return cc.FileUtils
|
||||
end
|
||||
_G["CCFileUtils"] = CCFileUtilsClassDeprecated()
|
||||
|
||||
--functions of CCFileUtils will be deprecated end
|
||||
local CCFileUtilsDeprecated = { }
|
||||
function CCFileUtilsDeprecated.sharedFileUtils()
|
||||
deprecatedTip("CCFileUtils:sharedFileUtils","CCFileUtils:getInstance")
|
||||
return cc.FileUtils:getInstance()
|
||||
end
|
||||
rawset(CCFileUtils,"sharedFileUtils",CCFileUtilsDeprecated.sharedFileUtils)
|
||||
|
||||
function CCFileUtilsDeprecated.purgeFileUtils()
|
||||
deprecatedTip("CCFileUtils:purgeFileUtils","CCFileUtils:destroyInstance")
|
||||
return cc.FileUtils:destroyInstance()
|
||||
end
|
||||
rawset(CCFileUtils,"purgeFileUtils",CCFileUtilsDeprecated.purgeFileUtils)
|
||||
--functions of CCFileUtils will be deprecated end
|
||||
--CCFileUtils class will be Deprecated,end
|
||||
|
||||
--SimpleAudioEngine will be deprecated begin
|
||||
local function SimpleAudioEngineClassDeprecated( )
|
||||
deprecatedTip("SimpleAudioEngine ","cc.SimpleAudioEngine")
|
||||
return cc.SimpleAudioEngine
|
||||
end
|
||||
_G["SimpleAudioEngine"] = SimpleAudioEngineClassDeprecated()
|
||||
|
||||
--functions of SimpleAudioEngine will be deprecated begin
|
||||
|
||||
local SimpleAudioEngineDeprecated = { }
|
||||
function SimpleAudioEngineDeprecated.sharedEngine()
|
||||
deprecatedTip("SimpleAudioEngine:sharedEngine","SimpleAudioEngine:getInstance")
|
||||
return cc.SimpleAudioEngine:getInstance()
|
||||
end
|
||||
rawset(SimpleAudioEngine,"sharedEngine",SimpleAudioEngineDeprecated.sharedEngine)
|
||||
|
||||
function SimpleAudioEngineDeprecated.playBackgroundMusic(self,...)
|
||||
deprecatedTip("SimpleAudioEngine:playBackgroundMusic","SimpleAudioEngine:playMusic")
|
||||
return self:playMusic(...)
|
||||
end
|
||||
rawset(SimpleAudioEngine,"playBackgroundMusic",SimpleAudioEngineDeprecated.playBackgroundMusic)
|
||||
|
||||
--functions of SimpleAudioEngine will be deprecated end
|
||||
|
||||
--SimpleAudioEngine class will be Deprecated,end
|
||||
|
||||
--CCMenuItemImage will be deprecated begin
|
||||
local function CCMenuItemImageClassDeprecated( )
|
||||
deprecatedTip("CCMenuItemImage ","cc.MenuItemImage")
|
||||
return cc.MenuItemImage
|
||||
end
|
||||
_G["CCMenuItemImage"] = CCMenuItemImageClassDeprecated( )
|
||||
|
||||
--CCMenu will be deprecated end
|
||||
|
||||
--CCMenu will be deprecated begin
|
||||
local function CCMenuClassDeprecated( )
|
||||
deprecatedTip("CCMenu ","cc.Menu")
|
||||
return cc.Menu
|
||||
end
|
||||
_G["CCMenu"] = cc.Menu
|
||||
|
||||
--functions of SimpleAudioEngine will be deprecated begin
|
||||
|
||||
local CCMenuDeprecated = { }
|
||||
function CCMenuDeprecated.createWithItem(self,...)
|
||||
deprecatedTip("CCMenuDeprecated:createWithItem","cc.Menu:create")
|
||||
return self:create(...)
|
||||
end
|
||||
rawset(CCMenu,"createWithItem",CCMenuDeprecated.createWithItem)
|
||||
--functions of SimpleAudioEngine will be deprecated end
|
||||
|
||||
--CCMenu will be deprecated end
|
||||
|
||||
--global functions wil be deprecated, begin
|
||||
local function CCRectMake(x,y,width,height)
|
||||
deprecatedTip("CCRectMake(x,y,width,height)","CCRect(x,y,width,height) in lua")
|
||||
return CCRect(x,y,width,height)
|
||||
end
|
||||
rawset(_G,"CCRectMake",CCRectMake)
|
||||
--global functions wil be deprecated, end
|
||||
|
||||
|
||||
--functions of _G will be deprecated begin
|
||||
local function ccpLineIntersect(a,b,c,d,s,t)
|
||||
deprecatedTip("ccpLineIntersect","CCPoint:isLineIntersect")
|
||||
|
@ -29,12 +220,6 @@ local function CCSizeMake(width,height)
|
|||
end
|
||||
rawset(_G,"CCSizeMake",CCSizeMake)
|
||||
|
||||
local function CCRectMake(x,y,width,height)
|
||||
deprecatedTip("CCRectMake(x,y,width,height)","CCRect(x,y,width,height)")
|
||||
return CCRect(x,y,width,height)
|
||||
end
|
||||
rawset(_G,"CCRectMake",CCRectMake)
|
||||
|
||||
local function ccpNeg(pt)
|
||||
deprecatedTip("ccpNeg","CCPoint.__sub")
|
||||
return CCPoint.__sub(CCPoint:new_local(0,0),pt)
|
||||
|
@ -408,22 +593,6 @@ rawset(CCEGLView,"sharedOpenGLView",CCEGLViewDeprecated.sharedOpenGLView)
|
|||
--functions of CCFileUtils will be deprecated end
|
||||
|
||||
|
||||
--functions of CCFileUtils will be deprecated end
|
||||
local CCFileUtilsDeprecated = { }
|
||||
function CCFileUtilsDeprecated.sharedFileUtils()
|
||||
deprecatedTip("CCFileUtils:sharedFileUtils","CCFileUtils:getInstance")
|
||||
return CCFileUtils:getInstance()
|
||||
end
|
||||
rawset(CCFileUtils,"sharedFileUtils",CCFileUtilsDeprecated.sharedFileUtils)
|
||||
|
||||
function CCFileUtilsDeprecated.purgeFileUtils()
|
||||
deprecatedTip("CCFileUtils:purgeFileUtils","CCFileUtils:destroyInstance")
|
||||
return CCFileUtils:destroyInstance()
|
||||
end
|
||||
rawset(CCFileUtils,"purgeFileUtils",CCFileUtilsDeprecated.purgeFileUtils)
|
||||
--functions of CCFileUtils will be deprecated end
|
||||
|
||||
|
||||
--functions of CCApplication will be deprecated end
|
||||
local CCApplicationDeprecated = { }
|
||||
function CCApplicationDeprecated.sharedApplication()
|
||||
|
@ -476,22 +645,6 @@ rawset(CCNotificationCenter,"purgeNotificationCenter",CCNotificationCenterDeprec
|
|||
--functions of CCNotificationCenter will be deprecated end
|
||||
|
||||
|
||||
--functions of CCTextureCache will be deprecated begin
|
||||
local CCTextureCacheDeprecated = { }
|
||||
function CCTextureCacheDeprecated.sharedTextureCache()
|
||||
deprecatedTip("CCTextureCache:sharedTextureCache","CCTextureCache:getInstance")
|
||||
return CCTextureCache:getInstance()
|
||||
end
|
||||
rawset(CCTextureCache,"sharedTextureCache",CCTextureCacheDeprecated.sharedTextureCache)
|
||||
|
||||
function CCTextureCacheDeprecated.purgeSharedTextureCache()
|
||||
deprecatedTip("CCTextureCache:purgeSharedTextureCache","CCTextureCache:destroyInstance")
|
||||
return CCTextureCache:destroyInstance()
|
||||
end
|
||||
rawset(CCTextureCache,"purgeSharedTextureCache",CCTextureCacheDeprecated.purgeSharedTextureCache)
|
||||
--functions of CCTextureCache will be deprecated end
|
||||
|
||||
|
||||
--functions of CCGrid3DAction will be deprecated begin
|
||||
local CCGrid3DActionDeprecated = { }
|
||||
function CCGrid3DActionDeprecated.vertex(self,pt)
|
||||
|
@ -697,17 +850,6 @@ end
|
|||
rawset(CCTMXLayer,"propertyNamed",CCTMXLayerDeprecated.propertyNamed)
|
||||
--functions of CCTMXLayer will be deprecated end
|
||||
|
||||
|
||||
--functions of SimpleAudioEngine will be deprecated begin
|
||||
local SimpleAudioEngineDeprecated = { }
|
||||
function SimpleAudioEngineDeprecated.sharedEngine()
|
||||
deprecatedTip("SimpleAudioEngine:sharedEngine","SimpleAudioEngine:getInstance")
|
||||
return SimpleAudioEngine:getInstance()
|
||||
end
|
||||
rawset(SimpleAudioEngine,"sharedEngine",SimpleAudioEngineDeprecated.sharedEngine)
|
||||
--functions of SimpleAudioEngine will be deprecated end
|
||||
|
||||
|
||||
--functions of CCTMXTiledMap will be deprecated begin
|
||||
local CCTMXTiledMapDeprecated = { }
|
||||
function CCTMXTiledMapDeprecated.layerNamed(self,layerName)
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit eb2e2124260b7bc1ebd27c0872aaf4e95ead93db
|
||||
Subproject commit e82fb176bd9a9fa573e3282e6af5ba19a7131633
|
|
@ -35,7 +35,7 @@ classes = Sprite.* Scene Node.* Director Layer.* Menu.* Touch .*Action.* Move.*
|
|||
# will apply to all class names. This is a convenience wildcard to be able to skip similar named
|
||||
# functions from all classes.
|
||||
|
||||
skip = Node::[setGLServerState description getUserObject .*UserData getGLServerState .*schedule],
|
||||
skip = Node::[setGLServerState description getUserObject .*UserData getGLServerState .*schedule getPosition],
|
||||
Sprite::[getQuad displayFrame getBlendFunc ^setPosition$ setBlendFunc setSpriteBatchNode getSpriteBatchNode],
|
||||
SpriteBatchNode::[getBlendFunc setBlendFunc],
|
||||
MotionStreak::[getBlendFunc setBlendFunc draw update],
|
||||
|
|
Loading…
Reference in New Issue