项目开发笔记-bb

2016年9月29日 星期四 恐龙乐园2

1 PH.combine() 只是过滤拼接

2 PATH_STORE_APP app路径

3 CCFileUtils 类

4 由于骨骼xml 文件 x4使用的是x2的,删除x4骨骼配置文件可以省去很资源。

function DragonBone.addFile(filePath)
    -- 格式化png, plist, xml路径
    local imagePath         = string.format("%s.png", filePath)
    local plistPath         = string.format("%s.plist", filePath)
    local configFilePath    = string.format("res/img/x2/%s.xml", filePath)

    -- 骨架数据管理对象
    local armatureDataManager = CCArmatureDataManager:sharedArmatureDataManager()
    -- 添加骨架文件信息
    armatureDataManager:addArmatureFileInfo(imagePath, plistPath, configFilePath)
end

5 gamebase:getAllSearchPathes()是骗子?

6 CCClippingNode

local mask  = D.img("lloading/mask.png")
local clip  = CCClippingNode:create()

clip:setStencil(mask)
clip:setAlphaThreshold(.5)
clip:setAnchorPoint(ccp(0,0))
self:addChild(clip) 
CCNodeExtend.extend(clip)

local node = D.img("node.png"):to(clip)
    :cycle({
        {"moveby", 1, ccp(500, 0)},
        {"moveby", 1, ccp(- 500, 0)},
        })

6 luabinding

你可能感兴趣的:(项目开发笔记-bb)