This commit is contained in:
2025-09-20 20:44:55 +08:00
parent 933bb7b51f
commit 0e7a009383
2 changed files with 11 additions and 4 deletions
+10 -3
View File
@@ -15,6 +15,7 @@ import {
ProgressBar,
Sprite,
SpriteFrame,
VideoPlayer,
} from "cc";
import { GButton } from "../../Main/Common/GButton";
import ResManager from "../../Main/Manager/ResManager";
@@ -60,7 +61,7 @@ export class PreloadUI extends Component {
loginBtn: Node;
private jinduBar: Node = null;
private jinduFilled: Sprite = null;
private VideoPlayer: VideoPlayer;
start() {
//Utils.addInnerEL(InnerMsgCode.UI_ShowPrompt, this, this.resiveShowPrompt)
Utils.parseNode(this.node, this._nodeTab);
@@ -68,6 +69,8 @@ export class PreloadUI extends Component {
this.loginBtn = this._nodeTab.btnLogin;
this.loginBtn.active = false;
this.VideoPlayer = this._nodeTab.VideoPlayer.getComponent(VideoPlayer);
GButton.BandClick(this.loginBtn, this.onLogin, this);
this.jinduBar = this.node.getChildByName("jinduBar");
@@ -81,6 +84,8 @@ export class PreloadUI extends Component {
this.jinduFilled.fillRange = 0;
if (!this.VideoPlayer.isPlaying) this.VideoPlayer.play();
// 初始化配置
ConfigManager.I.init();
//console.log(ConfigManager.tables.TbGlobalConfig.GameName);
@@ -254,10 +259,12 @@ export class PreloadUI extends Component {
let res = await CommonService.I.reqResConfig(reqData);
if (res && res.code === proto.cs.EnmRetCode.SUCCESS) {
// 保存数据
const aiCharacterData = DataManager.I.getDataById<AiCharacterData>(DataId.AiCharacter);
const aiCharacterData = DataManager.I.getDataById<AiCharacterData>(
DataId.AiCharacter
);
aiCharacterData.aiCharacter = res.data;
}
}
}
private enterGame() {
this.mainScene.init();