cc.Class({ extends: cc.Component, properties: { content: cc.Node }, init(cb) { this.cb = cb || function () {}; }, // LIFE-CYCLE CALLBACKS: onLoad () { }, start() { this.content.scaleX = 0; this.content.scaleY = 0; this.content.runAction(cc.scaleTo(0.35, 1, 1).easing(cc.easeBackOut())); }, dissmiss() { let finish = cc.callFunc(() => { this.node.destroy(); this.cb && this.cb(); }, this); let sequence = cc.sequence(cc.scaleTo(0.2, 0, 0).easing(cc.easeBackIn()), finish) this.content.runAction(sequence); }, // update (dt) {}, });