Compare commits
2 Commits
634873c579
...
bf779dfefa
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bf779dfefa | ||
|
|
4585780d02 |
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 = {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user