1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- const DWTool = require("../utils/DWTool");
- cc.Class({
- extends: cc.Component,
- properties: {
- tempNode: cc.Node,
- shineSprite: cc.Sprite,
- countLabel: cc.RichText
- },
- init(count) {
- this.countLabel.string = `<img src='alert_coin'/><color=#584A47> ${DWTool.coinParse(count)}</c>`;
- },
-
- onLoad () {
- },
- start() {
- let finish = cc.callFunc(() => {
- this.shineSprite.node.runAction(cc.rotateBy(0.8, 100, 100).repeatForever())
- }, this);
- this.tempNode.scaleX = 0;
- this.tempNode.scaleY = 0;
- let sequence = cc.sequence(cc.scaleTo(0.35, 1, 1).easing(cc.easeBackOut()), finish);
- this.tempNode.runAction(sequence);
- },
- dissmiss() {
- let finish = cc.callFunc(() => {
- this.node.destroy();
- }, this);
- let sequence = cc.sequence(cc.scaleTo(0.2, 0, 0).easing(cc.easeBackIn()), finish)
- this.tempNode.runAction(sequence);
- },
- close() {
- this.dissmiss();
- },
- });
|