/** * 图片流光效果 */ const {ccclass, property} = cc._decorator; @ccclass export default class FlowLightEffect extends cc.Component { sprite: cc.Sprite = null; onLoad(){ // this.sprite = this.node.getComponent(cc.Sprite) } private t1 = 0; update (dt) { // this.t1 += 0.01; // let _materi1 = this.sprite.getMaterial(0); // _materi1.setProperty("u_time", this.t1); } }