如题,有个需求,spine受攻后要做出闪白效果,由于sp.Skeleton接口color无法做到这种效果,所以使用了自定义材质,通过setProperty传输color修改颜色,经过一番折腾在论坛上找到了setProperty方法,但是在勾选Enable Batch后,该方法也无效了,不勾Enable Batch太卡了,求解!
setProperty代码:
let matCaches = this.body.bone.sp[’_materialCache’];
for (let x in matCaches) {
let m = matCaches[x];
m.setProperty("effAnimaColor", this.color);
}