Spring774
2025-11-04 0bef50e9ddf0df2d7bd9025086d5c526740c29db
assets/Script/Logo.ts
@@ -3,6 +3,7 @@
import { Sdk } from "./Sdk/Sdk";
import { SdkToutiao } from "./Sdk/SdkToutiao";
import DataTool from "./Sdk/DataTool";
import Global from "./Global";
const { ccclass, property } = cc._decorator;
@@ -19,10 +20,14 @@
    @property(cc.Button)
    buttonCancel: cc.Button = null;
    @property(cc.Button)
    buttonStartGame: cc.Button = null;
    onLoad() {
        cc.game.setFrameRate(60.01);
        this.ppNode.active = false;
        this.buttonStartGame.node.active = false;
    }
    start() {
@@ -90,7 +95,7 @@
            Userdata.loadUserdata(() => {
                this.scheduleOnce(() => {
                    this.openPrivacyPolicy();
                }, 1);
                }, 2);
            });
        } else {
@@ -118,8 +123,13 @@
    startGame() {
        if (Sdk.isHuawei) {
            Sdk.ins.startGame(() => {
                cc.director.loadScene(this.nextSceneName);
            Sdk.ins.startGame((result) => {
                if (result) {//自动登录成功
                    cc.director.loadScene(this.nextSceneName);
                } else {//显示开始游戏按钮
                    this.buttonStartGame.node.active = true;
                    this.ppNode.active = false;
                }
            });
        } else {
            cc.director.loadScene(this.nextSceneName);
@@ -172,4 +182,10 @@
        this.startGame();
    }
    onClickStartGame() {
        Global.debounceClicks(() => {
            this.startGame();
        })();
    }
}