/** @format */ import {BaseUI} from '../BaseUI' import {ccUtils} from '../../utils/ccUtils' import {Mgr} from '../../GameControl' import {UI} from '../../enums/UI' import {SOUND} from '../../enums/Sound' const {ccclass, property} = cc._decorator @ccclass export class TipUI extends BaseUI { onShow(args, fromUI: number) { // cc.tween(this.node).set({opacity: 255, y: -100}).to(1, {opacity: 0, y: 100}).start() Mgr.audio.playSFX(SOUND.tip) ccUtils.setLabel(args, this.node, 'bg/lb') // this.node.scale = 0.2 this.node.opacity = 0 this.node.stopAllActions() cc.tween(this.node) .then( cc.sequence( // cc.scaleTo(0.1, 1, 1), cc.fadeIn(0.2), cc.delayTime(1.5), cc.callFunc(() => { Mgr.ui.hide(UI.TipUI) }), ), ) .start() } }