--渐变颜色区域
local startColor = param and param.startColor or cc.c4b(255,255,255)
local endColor = param and param.endColor or cc.c4b(255,255)
--渐变层
local layer = cc.LayerGradient:create(startColor,endColor) self:addChild(layer) 原文链接:https://www.f2er.com/cocos2dx/339070.html