| 123456789101112131415161718192021222324252627282930313233343536373839 |
- import { _decorator, Component, Node, Animation } from 'cc';
- import { oops } from 'db://oops-framework/core/Oops';
- import { GameComponent } from 'db://oops-framework/module/common/GameComponent';
- import { UIID } from '../../common/config/GameUIConfig';
- const { ccclass, property } = _decorator;
- @ccclass('WelfareThree')
- export class WelfareThree extends GameComponent {
- @property(Node)
- private showNode1: Node = null!;
- @property(Node)
- private showNode2: Node = null!;
- start() {
- //3秒后打开官方承诺,关闭当前窗口
- this.showNode1.active = true;
- this.showNode2.active = false;
- this.scheduleOnce(() => {
- this.showNode1.active = false;
- this.showNode2.active = true;
- //播放动画
- const animation = this.showNode2.getComponent(Animation);
- if (animation) {
- animation.play();
- }
- //3秒后打开官方承诺,关闭当前窗口
- this.scheduleOnce(() => {
- oops.gui.remove(UIID.WelfareThree);
- }, 5)
- }, 3)
- }
- update(deltaTime: number) {
- }
- }
|