Compare commits
6 Commits
1961bc6ecd
...
4d5be00483
Author | SHA1 | Date | |
---|---|---|---|
![]() |
4d5be00483 | ||
![]() |
13f5d08d4d | ||
![]() |
03562bb36f | ||
![]() |
870d9ac98d | ||
![]() |
be42d3b146 | ||
![]() |
1625c203c1 |
|
@ -806,6 +806,7 @@ export default class GameManager extends cc.Component {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
setmonth(data) {
|
setmonth(data) {
|
||||||
|
console.log("得到的月卡信息:", data.data.monthCardTime);
|
||||||
//如果给的时间戳大于当前时间hpmax=7,否则等于5
|
//如果给的时间戳大于当前时间hpmax=7,否则等于5
|
||||||
let nowTime = Math.floor(Date.now() / 1000);
|
let nowTime = Math.floor(Date.now() / 1000);
|
||||||
if (data.data.monthCardTime > nowTime) {
|
if (data.data.monthCardTime > nowTime) {
|
||||||
|
|
|
@ -1696,6 +1696,9 @@ export default class MapConroler extends cc.Component {
|
||||||
cc.fx.AudioManager._instance.playEffect("anniu_Big", null);
|
cc.fx.AudioManager._instance.playEffect("anniu_Big", null);
|
||||||
if (cc.fx.GameConfig.GM_INFO.hp < 1) {
|
if (cc.fx.GameConfig.GM_INFO.hp < 1) {
|
||||||
MiniGameSdk.API.showToast("体力值不足");
|
MiniGameSdk.API.showToast("体力值不足");
|
||||||
|
setTimeout(() => {
|
||||||
|
this.openShop();
|
||||||
|
}, 500);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!this.againCanTouch) return;
|
if (!this.againCanTouch) return;
|
||||||
|
|
|
@ -72,6 +72,7 @@ export default class SceneManager extends cc.Component {
|
||||||
load3: boolean = false;
|
load3: boolean = false;
|
||||||
btnName: string = '';
|
btnName: string = '';
|
||||||
callBack: any;
|
callBack: any;
|
||||||
|
share_time: boolean = true;
|
||||||
|
|
||||||
|
|
||||||
// LIFE-CYCLE CALLBACKS:
|
// LIFE-CYCLE CALLBACKS:
|
||||||
|
@ -200,7 +201,7 @@ export default class SceneManager extends cc.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
|
this.share_time = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
startGame() {
|
startGame() {
|
||||||
|
@ -376,6 +377,7 @@ export default class SceneManager extends cc.Component {
|
||||||
|
|
||||||
//打开商店
|
//打开商店
|
||||||
openShop() {
|
openShop() {
|
||||||
|
console.log("进入sceneManager openShop");
|
||||||
if (!SceneManager.cachedShopPrefab) {
|
if (!SceneManager.cachedShopPrefab) {
|
||||||
cc.error('Shop prefab is not loaded yet.');
|
cc.error('Shop prefab is not loaded yet.');
|
||||||
return;
|
return;
|
||||||
|
@ -460,6 +462,8 @@ export default class SceneManager extends cc.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
shareFriend() {
|
shareFriend() {
|
||||||
|
if (this.share_time) {
|
||||||
|
this.share_time = false;
|
||||||
console.log("设置分享链接");
|
console.log("设置分享链接");
|
||||||
let timeStamp = Date.now();
|
let timeStamp = Date.now();
|
||||||
let otherInfo = {
|
let otherInfo = {
|
||||||
|
@ -468,6 +472,11 @@ export default class SceneManager extends cc.Component {
|
||||||
}
|
}
|
||||||
cc.fx.StorageMessage.setStorage("otherLevel", otherInfo);
|
cc.fx.StorageMessage.setStorage("otherLevel", otherInfo);
|
||||||
MiniGameSdk.API.shareGame();
|
MiniGameSdk.API.shareGame();
|
||||||
|
setTimeout(() => {
|
||||||
|
this.share_time = true;
|
||||||
|
}, 5000);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
update(dt) {
|
update(dt) {
|
||||||
|
|
|
@ -222,7 +222,7 @@ export default class Utils {
|
||||||
// 延迟 0.5 秒执行后续逻辑
|
// 延迟 0.5 秒执行后续逻辑
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
// 最大重试次数
|
// 最大重试次数
|
||||||
const maxRetries = 3;
|
const maxRetries = 5;
|
||||||
let retryCount = 0;
|
let retryCount = 0;
|
||||||
// 标志位,用于记录 callBack 是否已经被调用
|
// 标志位,用于记录 callBack 是否已经被调用
|
||||||
let isCallBackCalled = false;
|
let isCallBackCalled = false;
|
||||||
|
|
|
@ -163,12 +163,12 @@ export default class setUi extends cc.Component {
|
||||||
this.exit.getChildByName("Health").getChildByName("queding").active = true;
|
this.exit.getChildByName("Health").getChildByName("queding").active = true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (customEventData == "hp") {
|
// if (customEventData == "hp") {
|
||||||
if (cc.fx.GameConfig.GM_INFO.hp <= 0) {
|
// if (cc.fx.GameConfig.GM_INFO.hp <= 0) {
|
||||||
MiniGameSdk.API.showToast("体力值不足");
|
// MiniGameSdk.API.showToast("体力值不足");
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
MapConroler._instance.againLevel();
|
MapConroler._instance.againLevel();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2108,7 +2108,7 @@
|
||||||
"ctor": "Float64Array",
|
"ctor": "Float64Array",
|
||||||
"array": [
|
"array": [
|
||||||
-2.798,
|
-2.798,
|
||||||
-638.472,
|
-2158.941,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
|
@ -2345,7 +2345,7 @@
|
||||||
"ctor": "Float64Array",
|
"ctor": "Float64Array",
|
||||||
"array": [
|
"array": [
|
||||||
-339.058,
|
-339.058,
|
||||||
-964.781,
|
-2485.25,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
|
@ -2929,7 +2929,7 @@
|
||||||
"ctor": "Float64Array",
|
"ctor": "Float64Array",
|
||||||
"array": [
|
"array": [
|
||||||
12.942,
|
12.942,
|
||||||
-964.781,
|
-2485.25,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
|
@ -3513,7 +3513,7 @@
|
||||||
"ctor": "Float64Array",
|
"ctor": "Float64Array",
|
||||||
"array": [
|
"array": [
|
||||||
364.942,
|
364.942,
|
||||||
-964.781,
|
-2485.25,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
|
@ -4097,7 +4097,7 @@
|
||||||
"ctor": "Float64Array",
|
"ctor": "Float64Array",
|
||||||
"array": [
|
"array": [
|
||||||
-339.058,
|
-339.058,
|
||||||
-1458.781,
|
-2979.25,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
|
@ -4681,7 +4681,7 @@
|
||||||
"ctor": "Float64Array",
|
"ctor": "Float64Array",
|
||||||
"array": [
|
"array": [
|
||||||
12.942,
|
12.942,
|
||||||
-1458.781,
|
-2979.25,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
|
@ -5265,7 +5265,7 @@
|
||||||
"ctor": "Float64Array",
|
"ctor": "Float64Array",
|
||||||
"array": [
|
"array": [
|
||||||
364.942,
|
364.942,
|
||||||
-1458.781,
|
-2979.25,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
|
@ -5834,7 +5834,7 @@
|
||||||
"ctor": "Float64Array",
|
"ctor": "Float64Array",
|
||||||
"array": [
|
"array": [
|
||||||
0.491,
|
0.491,
|
||||||
-1775.766,
|
-599.734,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
|
@ -6056,7 +6056,7 @@
|
||||||
"ctor": "Float64Array",
|
"ctor": "Float64Array",
|
||||||
"array": [
|
"array": [
|
||||||
0,
|
0,
|
||||||
-2085.237,
|
-905.205,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
|
@ -6501,7 +6501,7 @@
|
||||||
"ctor": "Float64Array",
|
"ctor": "Float64Array",
|
||||||
"array": [
|
"array": [
|
||||||
-2.3,
|
-2.3,
|
||||||
-2554.684,
|
-1389.652,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
|
@ -7058,7 +7058,7 @@
|
||||||
"ctor": "Float64Array",
|
"ctor": "Float64Array",
|
||||||
"array": [
|
"array": [
|
||||||
-1.476,
|
-1.476,
|
||||||
-3026.889,
|
-1861.857,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
|
@ -7571,7 +7571,7 @@
|
||||||
"ctor": "Float64Array",
|
"ctor": "Float64Array",
|
||||||
"array": [
|
"array": [
|
||||||
0,
|
0,
|
||||||
-36.983,
|
1128.049,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user