From 0bef50e9ddf0df2d7bd9025086d5c526740c29db Mon Sep 17 00:00:00 2001
From: Spring774 <337905794@qq.com>
Date: Tue, 04 Nov 2025 21:20:18 +0800
Subject: [PATCH] 接为华为,可以直接提交审核
---
assets/Script/Logo.ts | 22 +++++++++++++++++++---
1 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/assets/Script/Logo.ts b/assets/Script/Logo.ts
index 476ce5c..9a3e716 100644
--- a/assets/Script/Logo.ts
+++ b/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();
+ })();
+ }
}
--
Gitblit v1.9.1