51 lines
1.2 KiB
TypeScript
51 lines
1.2 KiB
TypeScript
/*
|
|
* @Author: WoNiu
|
|
* @Date: 2024-03-29 13:20:16
|
|
* @LastEditTime: 2024-03-29 14:16:51
|
|
* @LastEditors: WoNiu
|
|
* @Description: 游戏匹配过程控制
|
|
*/
|
|
import { _decorator, Component, Director, director, Node } from "cc";
|
|
import { UIRoot } from "./UIRoot";
|
|
import { GameRootSingleton } from "./../GameRootController";
|
|
const { ccclass, property } = _decorator;
|
|
|
|
@ccclass("GameMatchingProcessControl")
|
|
/**
|
|
* @description: 游戏匹配过程控制
|
|
*/
|
|
export class GameMatchingProcessControl extends Component {
|
|
/** UIRoot 节点的 UI节点 */
|
|
uiRoot: UIRoot;
|
|
|
|
start() {
|
|
this.uiRoot = GameRootSingleton.getInstance().UIRoot;
|
|
|
|
this.countDown();
|
|
}
|
|
|
|
//todo 自动跳过,接入网络后修改
|
|
/** 匹配加载动画控制 */
|
|
countDown() {
|
|
|
|
// 1秒后 结束加载
|
|
setTimeout(() => {
|
|
/// 这一帧结束之后销毁
|
|
director.once(Director.EVENT_END_FRAME, () => {
|
|
// 销毁
|
|
this.uiRoot.awaitGamerNode.destroy();
|
|
|
|
// todo 开发时跳过倒计时动画
|
|
/// 初始化开始倒计时动画
|
|
// this.initCountDownFontAni(5);
|
|
});
|
|
|
|
// todo 开发时跳过倒计时动画
|
|
this.uiRoot.countDownAniDone();
|
|
}, 1000);
|
|
|
|
}
|
|
|
|
update(deltaTime: number) {}
|
|
}
|