12345678910111213141516171819202122232425262728293031323334353637383940 |
- const DWTool = require("../utils/DWTool");
- cc.Class({
- extends: cc.Component,
- properties: {
- content: cc.Node,
- countLabel: cc.Label
- },
- init(count) {
- this.countLabel.string = DWTool.coinParse(count);
- },
- // 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);
- let sequence = cc.sequence(cc.scaleTo(0.2, 0, 0).easing(cc.easeBackIn()), finish)
- this.content.runAction(sequence);
- },
- close() {
- this.dissmiss();
- },
- });
|