| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104 |
- /** 常规提现进度提醒
- * @author lzg
- * @date 20210306
- */
- import CashOutData from "../datas/CashOutData";
- import GameM, { AUDIO_TYPE } from "../manager/GameM";
- import UiM, { PANEL_NAME } from "../manager/UiM";
- import Main from "../Main";
- const { ccclass, property } = cc._decorator;
- @ccclass
- export default class NormalCashProNode extends cc.Component {
- @property(cc.Node)
- par: cc.Node = null;
- @property(cc.Label)
- labGapLv: cc.Label = null;
- @property(cc.Sprite)
- spMonster: cc.Sprite = null;
- @property(cc.Label)
- labLv: cc.Label = null;
- @property(cc.Label)
- labLv1: cc.Label = null;
- @property(cc.Label)
- labMoney: cc.Label = null;
- @property(cc.Node)
- qipao: cc.Node = null;
- @property(cc.Node)
- btnGoon: cc.Node = null;
- @property(cc.Node)
- btnClose: cc.Node = null;
- start() {
- let cashCfg = CashOutData.Instance.cashCft
- let len = cashCfg.length
- let curCashCfg = null
- for (var i = 0; i < len; i++) {
- if (GameM.commonData.maxCarLevel < cashCfg[i].type_value) {
- curCashCfg = cashCfg[i]
- break
- }
- }
- let gapLv = curCashCfg.type_value - GameM.commonData.maxCarLevel
- this.labGapLv.string = `${gapLv}`
- cc.loader.loadRes('carPic/side/side_' + GameM.commonData.maxCarLevel, cc.SpriteFrame, (err, assets) => {
- if (err) {
- cc.error(err);
- return;
- }
- this.spMonster.spriteFrame = assets;
- })
- this.labLv.string = GameM.commonData.maxCarLevel.toString()
- this.labLv1.string = curCashCfg.type_value.toString()
- let money = curCashCfg.moneyshow.split('~')[1].replace('元', '')
- this.labMoney.string = money
- // this.qipao.scale = 0
- // this.btnGoon.scale = 0
- // cc.tween(this.qipao)
- // .delay(0.5)
- // .to(0.3, { scale: 1 })
- // .start()
- // this.btnClose.active = false
- // cc.tween(this.btnGoon)
- // .delay(1.5)
- // .call(() => {
- // this.btnClose.active = true
- // })
- // .to(0.3, { scale: 1 })
- // .start()
- }
- clickClose() {
- GameM.audioM.playEffect(AUDIO_TYPE.button)
- this.hideEff()
- }
- hideEff() {
- let main = UiM.Instance.hallNode.getComponent(Main)
- let pos1 = main.tixianProBtn.node.position
- let addY = 0
- if (cc.winSize.height > 1500) {
- addY = 90
- }
- let pos = cc.v2(pos1.x, pos1.y + addY)
- cc.tween(this.par).to(0.4, { scale: 0, position: pos }).call(() => {
- UiM.Instance.offPanel(PANEL_NAME.NormalCashProNode)
- }).start();
- }
- }
|