Compare commits

..

2 Commits

Author SHA1 Message Date
COMPUTER\EDY bf779dfefa Merge remote-tracking branch 'origin/main' 2025-10-17 19:17:05 +08:00
COMPUTER\EDY 4585780d02 更新loading 2025-10-17 19:16:27 +08:00
3 changed files with 31 additions and 1 deletions

View File

@ -17581,7 +17581,7 @@
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "b51c6577-3f31-4777-bf4a-6bfad58f0612"
"__uuid__": "ab9b1a6d-9c1b-4d87-ba50-43dbe414eb7f"
},
"_type": 0,
"_sizeMode": 1,

View File

@ -512,6 +512,16 @@ export default class SceneManager extends cc.Component {
}
openLoad() {
this.node.getChildByName("Loading").active = true;
this.node.getChildByName("Loading").getChildByName("load").stopAllActions();
this.node.getChildByName("Loading").getChildByName("load").runAction(cc.rotateTo(2, 1080).repeatForever());
}
closeLoad() {
this.node.getChildByName("Loading").active = false;
}
update(dt) {
}

View File

@ -1,4 +1,5 @@
import JiaZai from "../../JiaZai";
import MapConroler from "../../Map";
import Freeze from "../../prop/Freeze";
import SceneManager from "../../SceneManager";
@ -1475,6 +1476,24 @@ var GameTool = {
onShowVideo(callback: Function, videoData: any) {
if (typeof wx !== 'undefined' && wx !== null) {
let scene = null;
const jiazaiNode = cc.find("Canvas"); // 假设 JiaZai 挂在 Canvas 节点
if (jiazaiNode) {
scene = jiazaiNode.getComponent(JiaZai);
if (scene) {
scene.openLoad();
}
} else {
const canvasTemp = cc.find("Canvas"); // 假设 Canvas 节点
if (canvasTemp) {
scene = canvasTemp.getComponent("SceneManager");
if (scene) {
scene.openLoad();
}
} else {
console.log("SceneManager 节点未找到");
}
}
let requestData = {
ad_type: "激励视频", //广告类型
ad_placement_name: videoData.ad_placement_name, //内部广告位名称 //2000复活 道具 2001 2002 2003
@ -1487,6 +1506,7 @@ var GameTool = {
console.log('用户看的视频广告个数是:', count);
// 根据用户观看广告的结果执行不同的逻辑s
console.log('用户观看视频广告结果:', res);
if (scene) scene.closeLoad();
let duration = Math.floor(Date.now() / 1000) - cc.fx.GameConfig.GM_INFO.videoTime;
if (duration <= 0) duration = 0;
let data = {