当前位置 : 主页 > 手机开发 > 其它 >

cocos2dx之 渐变层

来源:互联网 收集:自由互联 发布时间:2021-06-13
--渐变颜色区域 local startColor = param and param .startColor or cc.c4b( 255 , 255 , 255 , 255 ) local endColor = param and param .endColor or cc.c4b( 255 , 0 , 0 , 255 ) --渐变层 local layer = cc.LayerGradient: create (startColor,
--渐变颜色区域
local startColor  = param and param.startColor or cc.c4b(255, 255, 255, 255)
local endColor    = param and param.endColor or cc.c4b(255, 0, 0, 255)
--渐变层
local layer = cc.LayerGradient:create(startColor, endColor)
self:addChild(layer)
网友评论