diff --git a/assets/Script/Block.ts b/assets/Script/Block.ts index 709055a..66d4cdb 100644 --- a/assets/Script/Block.ts +++ b/assets/Script/Block.ts @@ -866,6 +866,14 @@ export default class Block extends cc.Component { return false; } + if (this.type == BlockType.上锁块) { + if (this.node.getChildByName("lock")) { + let lock = this.node.getChildByName("lock").getChildByName("icon"); + lock.stopAllActions(); + lock.rotation = 0; + lock.runAction(cc.sequence(cc.rotateTo(0.1, -10), cc.rotateTo(0.2, 10), cc.rotateTo(0.2, -10), cc.rotateTo(0.1, 0))); + } + } if (this.type != BlockType.上锁块 && this.type != BlockType.冻结块 && this.type != BlockType.第二上锁块) { MapConroler._instance.startUpdate(); if (this.type == BlockType.钥匙块) diff --git a/assets/Script/GameManager.ts b/assets/Script/GameManager.ts index 5fa13bb..9784eef 100644 --- a/assets/Script/GameManager.ts +++ b/assets/Script/GameManager.ts @@ -61,6 +61,7 @@ export default class GameManager extends cc.Component { // }); this.startTimeCutDown(); cc.fx.GameConfig.init(true); + cc.fx.GameConfig.GM_INFO.sceneValue = "loadScene"; cc.fx.GameConfig.GM_INFO.gameState = false; setTimeout(() => { cc.fx.GameTool.initWechatErrorTracking(); diff --git a/assets/Script/JiaZai.ts b/assets/Script/JiaZai.ts index 74a328c..454263a 100644 --- a/assets/Script/JiaZai.ts +++ b/assets/Script/JiaZai.ts @@ -119,6 +119,7 @@ export default class JiaZai extends cc.Component { if (cc.fx.GameConfig.GM_INFO.otherUid != "") { this.getShareInfo(); } + cc.fx.GameConfig.GM_INFO.sceneValue = "HomeScene"; initProvinceLocator(); // this.RankNode = null; this.isShow = true; diff --git a/assets/Script/Map.ts b/assets/Script/Map.ts index ffe0817..01890e0 100644 --- a/assets/Script/Map.ts +++ b/assets/Script/Map.ts @@ -193,7 +193,7 @@ export default class MapConroler extends cc.Component { // cc.fx.GameConfig.GM_INFO.level += 1; // cc.fx.GameConfig.LEVEL_INFO_init(true, 0, false); // }, 1000); - + cc.fx.GameConfig.GM_INFO.sceneValue = "GameScene"; MiniGameSdk.API.setNewCloudlevel(); cc.fx.GameConfig.GM_INFO.review = 0; diff --git a/assets/Script/module/Config/GameConfig.ts b/assets/Script/module/Config/GameConfig.ts index 296a70c..02481a7 100644 --- a/assets/Script/module/Config/GameConfig.ts +++ b/assets/Script/module/Config/GameConfig.ts @@ -141,6 +141,7 @@ export class GameConfig { firstTime: number; //用户注册时间 longitude: string; //用户经度 cityRank: number; //城市排名 + sceneValue: string; //当前场景值 shopDouble: { gold_1: boolean; gold_2: boolean; gold_3: boolean; gold_4: boolean; gold_5: boolean; gold_6: boolean; }; }; @@ -157,6 +158,7 @@ export class GameConfig { + //游戏内信息 static get Instance() { @@ -326,6 +328,7 @@ export class GameConfig { firstTime: 0, //用户注册时间 longitude: "", //用户经度 cityRank: 99, //城市排名 + sceneValue: "", //当前场景值 shopDouble: { "gold_1": false, "gold_2": false, diff --git a/assets/Script/module/Tool/GameTool.ts b/assets/Script/module/Tool/GameTool.ts index 63be819..6713410 100644 --- a/assets/Script/module/Tool/GameTool.ts +++ b/assets/Script/module/Tool/GameTool.ts @@ -2076,6 +2076,7 @@ var GameTool = { let errorData = { error_type: "javascript", error_message: error.message || String(error), + error_scene: cc.fx.GameConfig.GM_INFO?.sceneValue || 'null', error_stack: error.stack || '', game_version: cc.fx.GameConfig.GM_INFO?.version || 'unknown', user_id: cc.fx.GameConfig.GM_INFO?.userId || 'unknown', diff --git a/assets/Script/prop/Lock.ts b/assets/Script/prop/Lock.ts index 0dfb34d..6581bd2 100644 --- a/assets/Script/prop/Lock.ts +++ b/assets/Script/prop/Lock.ts @@ -29,8 +29,8 @@ export default class Lock extends cc.Component { init(time, type, block) { if (time) this.time = time; if (type) this.type = type; - this.node.getChildByName("time").active = true; - NumberToImage.numberToImageNodes(this.time, 20, 8, "lock_", this.node.getChildByName("time"), false); + this.node.getChildByName("icon").getChildByName("time").active = true; + NumberToImage.numberToImageNodes(this.time, 20, 8, "lock_", this.node.getChildByName("icon").getChildByName("time"), false); let lock = this.node.getChildByName("lock"); if (block != null) { switch (block) { diff --git a/assets/action_bundle/script/DailyQuests.ts b/assets/action_bundle/script/DailyQuests.ts index 678792e..941b97e 100644 --- a/assets/action_bundle/script/DailyQuests.ts +++ b/assets/action_bundle/script/DailyQuests.ts @@ -35,6 +35,7 @@ export default class DailyQuests extends cc.Component { public home: number = 0; public touchStart: boolean = false; public reward: boolean = false; + sceneValue: any; onLoad() { this.btn_Touch = true; @@ -48,6 +49,7 @@ export default class DailyQuests extends cc.Component { // this.init(); } init(data) { + this.sceneValue = cc.fx.GameConfig.GM_INFO.sceneValue; cc.fx.GameConfig.GM_INFO.tasks.levelPass = data["levelPass"]; cc.fx.GameConfig.GM_INFO.tasks.share = data["share"]; cc.fx.GameConfig.GM_INFO.tasks.useEnergy = data["useEnergy"]; @@ -268,6 +270,8 @@ export default class DailyQuests extends cc.Component { } closeDailyQuests() { + if (this.sceneValue) + cc.fx.GameConfig.GM_INFO.sceneValue = this.sceneValue; this.node.active = false; const jiazaiNode = cc.find("Canvas"); // 假设 JiaZai 挂在 Canvas 节点 const jiazaiComp = jiazaiNode.getComponent(JiaZai); diff --git a/assets/prefab/prop/lock.prefab b/assets/prefab/prop/lock.prefab index 469d45c..dfd4c9a 100644 --- a/assets/prefab/prop/lock.prefab +++ b/assets/prefab/prop/lock.prefab @@ -22,9 +22,6 @@ }, { "__id__": 34 - }, - { - "__id__": 37 } ], "_active": true, @@ -1265,15 +1262,19 @@ "_parent": { "__id__": 1 }, - "_children": [], - "_active": true, - "_components": [ + "_children": [ { "__id__": 35 } ], + "_active": true, + "_components": [ + { + "__id__": 37 + } + ], "_prefab": { - "__id__": 36 + "__id__": 38 }, "_opacity": 255, "_color": { @@ -1291,14 +1292,14 @@ "_anchorPoint": { "__type__": "cc.Vec2", "x": 0.5, - "y": 0.5 + "y": 1 }, "_trs": { "__type__": "TypedArray", "ctor": "Float64Array", "array": [ 0, - 4.941, + 47.414, 0, 0, 0, @@ -1322,6 +1323,77 @@ "groupIndex": 0, "_id": "" }, + { + "__type__": "cc.Node", + "_name": "time", + "_objFlags": 0, + "_parent": { + "__id__": 34 + }, + "_children": [], + "_active": true, + "_components": [], + "_prefab": { + "__id__": 36 + }, + "_opacity": 255, + "_color": { + "__type__": "cc.Color", + "r": 255, + "g": 255, + "b": 255, + "a": 255 + }, + "_contentSize": { + "__type__": "cc.Size", + "width": 0, + "height": 0 + }, + "_anchorPoint": { + "__type__": "cc.Vec2", + "x": 0.5, + "y": 0.5 + }, + "_trs": { + "__type__": "TypedArray", + "ctor": "Float64Array", + "array": [ + -4.914, + -56.628, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1 + ] + }, + "_eulerAngles": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + }, + "_skewX": 0, + "_skewY": 0, + "_is3DNode": false, + "_groupIndex": 0, + "groupIndex": 0, + "_id": "" + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 1 + }, + "asset": { + "__id__": 0 + }, + "fileId": "4fERA/vpRLmbBdMjIwwR/p", + "sync": false + }, { "__type__": "cc.Sprite", "_name": "", @@ -1364,78 +1436,7 @@ "asset": { "__id__": 0 }, - "fileId": "bb95+KyRFKEr1Wy/7D5xg5", - "sync": false - }, - { - "__type__": "cc.Node", - "_name": "time", - "_objFlags": 0, - "_parent": { - "__id__": 1 - }, - "_children": [], - "_active": true, - "_components": [], - "_prefab": { - "__id__": 38 - }, - "_opacity": 255, - "_color": { - "__type__": "cc.Color", - "r": 255, - "g": 255, - "b": 255, - "a": 255 - }, - "_contentSize": { - "__type__": "cc.Size", - "width": 0, - "height": 0 - }, - "_anchorPoint": { - "__type__": "cc.Vec2", - "x": 0.5, - "y": 0.5 - }, - "_trs": { - "__type__": "TypedArray", - "ctor": "Float64Array", - "array": [ - -4.914, - -9.214, - 0, - 0, - 0, - 0, - 1, - 1, - 1, - 1 - ] - }, - "_eulerAngles": { - "__type__": "cc.Vec3", - "x": 0, - "y": 0, - "z": 0 - }, - "_skewX": 0, - "_skewY": 0, - "_is3DNode": false, - "_groupIndex": 0, - "groupIndex": 0, - "_id": "" - }, - { - "__type__": "cc.PrefabInfo", - "root": { - "__id__": 1 - }, - "asset": { - "__id__": 0 - }, - "fileId": "48VT9XUVVAfKNIh+R4ESes", + "fileId": "9fUIRycoFLUbwjeZfdD6Fc", "sync": false }, { diff --git a/assets/shop/script/shop.ts b/assets/shop/script/shop.ts index 7a64c68..ad62881 100644 --- a/assets/shop/script/shop.ts +++ b/assets/shop/script/shop.ts @@ -49,6 +49,7 @@ export default class NewClass extends cc.Component { private iosCount: number = 1; scheduleCallback3: any; scheduleCallback2: Function; + sceneValue: string = ""; reward: boolean = false; private monthCard: boolean = false; doubleInfo: null; @@ -122,8 +123,9 @@ export default class NewClass extends cc.Component { } //打开商店界面 openShop() { + this.sceneValue = cc.fx.GameConfig.GM_INFO.sceneValue; Utils.outTradeNo = null; - + cc.fx.GameConfig.GM_INFO.sceneValue = "Shop"; this.initCoin(); // 商品数据数组 @@ -220,6 +222,8 @@ export default class NewClass extends cc.Component { } //关闭商店界面 closeShop(data, currentCoin) { + if (this.sceneValue) + cc.fx.GameConfig.GM_INFO.sceneValue = this.sceneValue; // 移除 wx.onShow 监听器 if ((cc.sys.platform === cc.sys.WECHAT_GAME || cc.sys.platform === cc.sys.BYTEDANCE_GAME) && this.onShowListener) { console.log("shop移除onshow");