脚本挂在Camera身上
cc.Class({
extends: cc.Component,
properties: {
_state: "idle"
},
// LIFE-CYCLE CALLBACKS:
// onLoad () {},
/**设置全部 */
setAll(x, y, times, duration) {
this.amplitudeX = x;
this.amplitudeY = y;
this.duration = duration;
this.times = times;
},
shaker(type = "out") {
let node = this.node;
this.shakeObj = {
node