求助1111
主要在平面内逐渐变暗来模拟黑天白天的效果
用tween 来改变color的值
我尝试过,但是貌似不让改
let c=this.bg.getComponent(Sprite).color;
tween(c)
.to(3,{
r:155,g:155,b:155
},{"onUpdate":function(tartget){
this.bg.getComponent(Sprite).color=tartget;}}
)
.start();
我发了我尝试的tween代码
cc.tween(this.bg).to(3,{color:new cc.Color(155,155,155)}).start();