--渐变颜色区域 local startColor = param and param.startColor or cc.c4b(255,255,255) local endColor = param and param.endColor or cc.c4b(255,0,255) --渐变层 local layer = cc.LayerGradient:create(startColor,endColor) self:addChild(layer)