1234567891011121314151617181920212223242526272829303132 |
- /** @format */
- import {UI} from '../enums/UI'
- import {BaseUI} from './BaseUI'
- import {Mgr} from '../GameControl'
- import {SOUND} from '../enums/Sound'
- import {ccUtils} from '../utils/ccUtils'
- const {ccclass, property} = cc._decorator
- @ccclass
- export class PowerUpUI extends BaseUI {
- onShow(args, fromUI: number) {
- ccUtils.setLabel(args, this.node, 'lb')
- this.node.scale = 0.2
- this.node.opacity = 0
- this.node.y = -50
- this.node.stopAllActions()
- cc.tween(this.node)
- .then(
- cc.sequence(
- cc.spawn(cc.scaleTo(0.2, 1, 1), cc.fadeIn(0.2)),
- cc.moveBy(0.5, cc.v2(0, 100)),
- cc.delayTime(1),
- cc.callFunc(() => {
- Mgr.ui.hide(UI.PowerUpUI)
- }),
- ),
- )
- .start()
- }
- }
|