CCOrbitCamera:create

local layer = getBaseLayer()
 

sprite = CCSprite:create("Images/white-512x512.png")

    layer:addChild(sprite, 0, 40)
    sprite:setPosition(CCPointMake(s.width / 5 * 1, s.height / 5 * 4))
    sprite:setColor(ccc3(0, 0, 255))
    sprite:setTextureRect(CCRectMake(0, 0, 120, 50))
 
 
--旋转的时间、起始半径、半径差、起始z角、旋转z角差、起始x角、旋转x角差
    orbit = CCOrbitCamera:create(10, 1, 0, 0, 360, 0, 0)
 
    sprite:runAction(CCRepeatForever:create(orbit))
 
 
调用lua
package.path = package.path ..  ";..\?.lua"
require(pardirfile)

 

你可能感兴趣的:(create)