Przeglądaj źródła

发射器规则

甘艺伟 8 godzin temu
rodzic
commit
755384f873

BIN
assets/bundle/FGUI/Home/Home.bin


+ 28 - 140
assets/bundle/gridMap/UECube.prefab

@@ -24,23 +24,20 @@
         "__id__": 8
         "__id__": 8
       },
       },
       {
       {
-        "__id__": 11
-      },
-      {
-        "__id__": 16
+        "__id__": 13
       },
       },
       {
       {
-        "__id__": 20
+        "__id__": 17
       }
       }
     ],
     ],
     "_active": true,
     "_active": true,
     "_components": [
     "_components": [
       {
       {
-        "__id__": 27
+        "__id__": 24
       }
       }
     ],
     ],
     "_prefab": {
     "_prefab": {
-      "__id__": 28
+      "__id__": 25
     },
     },
     "_opacity": 255,
     "_opacity": 255,
     "_color": {
     "_color": {
@@ -284,114 +281,6 @@
   },
   },
   {
   {
     "__type__": "cc.Node",
     "__type__": "cc.Node",
-    "_name": "lbt_num",
-    "_objFlags": 0,
-    "_parent": {
-      "__id__": 1
-    },
-    "_children": [],
-    "_active": true,
-    "_components": [
-      {
-        "__id__": 9
-      }
-    ],
-    "_prefab": {
-      "__id__": 10
-    },
-    "_opacity": 255,
-    "_color": {
-      "__type__": "cc.Color",
-      "r": 138,
-      "g": 255,
-      "b": 0,
-      "a": 255
-    },
-    "_contentSize": {
-      "__type__": "cc.Size",
-      "width": 0,
-      "height": 50.4
-    },
-    "_anchorPoint": {
-      "__type__": "cc.Vec2",
-      "x": 0.5,
-      "y": 0.5
-    },
-    "_trs": {
-      "__type__": "TypedArray",
-      "ctor": "Float64Array",
-      "array": [
-        0,
-        0,
-        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.Label",
-    "_name": "",
-    "_objFlags": 0,
-    "node": {
-      "__id__": 8
-    },
-    "_enabled": true,
-    "_materials": [
-      {
-        "__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
-      }
-    ],
-    "_srcBlendFactor": 770,
-    "_dstBlendFactor": 771,
-    "_string": "",
-    "_N$string": "",
-    "_fontSize": 40,
-    "_lineHeight": 40,
-    "_enableWrapText": true,
-    "_N$file": null,
-    "_isSystemFontUsed": true,
-    "_spacingX": 0,
-    "_batchAsBitmap": false,
-    "_styleFlags": 0,
-    "_underlineHeight": 0,
-    "_N$horizontalAlign": 1,
-    "_N$verticalAlign": 1,
-    "_N$fontFamily": "Arial",
-    "_N$overflow": 0,
-    "_N$cacheMode": 0,
-    "_id": ""
-  },
-  {
-    "__type__": "cc.PrefabInfo",
-    "root": {
-      "__id__": 1
-    },
-    "asset": {
-      "__id__": 0
-    },
-    "fileId": "5eC2ShfUdKU4YbXvNlqkE4",
-    "sync": false
-  },
-  {
-    "__type__": "cc.Node",
     "_name": "node_waitMerge",
     "_name": "node_waitMerge",
     "_objFlags": 0,
     "_objFlags": 0,
     "_parent": {
     "_parent": {
@@ -399,13 +288,13 @@
     },
     },
     "_children": [
     "_children": [
       {
       {
-        "__id__": 12
+        "__id__": 9
       }
       }
     ],
     ],
     "_active": false,
     "_active": false,
     "_components": [],
     "_components": [],
     "_prefab": {
     "_prefab": {
-      "__id__": 15
+      "__id__": 12
     },
     },
     "_opacity": 255,
     "_opacity": 255,
     "_color": {
     "_color": {
@@ -459,17 +348,17 @@
     "_name": "jbsp",
     "_name": "jbsp",
     "_objFlags": 0,
     "_objFlags": 0,
     "_parent": {
     "_parent": {
-      "__id__": 11
+      "__id__": 8
     },
     },
     "_children": [],
     "_children": [],
     "_active": true,
     "_active": true,
     "_components": [
     "_components": [
       {
       {
-        "__id__": 13
+        "__id__": 10
       }
       }
     ],
     ],
     "_prefab": {
     "_prefab": {
-      "__id__": 14
+      "__id__": 11
     },
     },
     "_opacity": 255,
     "_opacity": 255,
     "_color": {
     "_color": {
@@ -523,7 +412,7 @@
     "_name": "",
     "_name": "",
     "_objFlags": 0,
     "_objFlags": 0,
     "node": {
     "node": {
-      "__id__": 12
+      "__id__": 9
     },
     },
     "_enabled": true,
     "_enabled": true,
     "_materials": [
     "_materials": [
@@ -583,14 +472,14 @@
     "_active": true,
     "_active": true,
     "_components": [
     "_components": [
       {
       {
-        "__id__": 17
+        "__id__": 14
       },
       },
       {
       {
-        "__id__": 18
+        "__id__": 15
       }
       }
     ],
     ],
     "_prefab": {
     "_prefab": {
-      "__id__": 19
+      "__id__": 16
     },
     },
     "_opacity": 255,
     "_opacity": 255,
     "_color": {
     "_color": {
@@ -644,7 +533,7 @@
     "_name": "",
     "_name": "",
     "_objFlags": 0,
     "_objFlags": 0,
     "node": {
     "node": {
-      "__id__": 16
+      "__id__": 13
     },
     },
     "_enabled": true,
     "_enabled": true,
     "_materials": [
     "_materials": [
@@ -677,7 +566,7 @@
     "_name": "",
     "_name": "",
     "_objFlags": 0,
     "_objFlags": 0,
     "node": {
     "node": {
-      "__id__": 16
+      "__id__": 13
     },
     },
     "_enabled": true,
     "_enabled": true,
     "alignMode": 1,
     "alignMode": 1,
@@ -719,20 +608,20 @@
     },
     },
     "_children": [
     "_children": [
       {
       {
-        "__id__": 21
+        "__id__": 18
       }
       }
     ],
     ],
     "_active": false,
     "_active": false,
     "_components": [
     "_components": [
       {
       {
-        "__id__": 24
+        "__id__": 21
       },
       },
       {
       {
-        "__id__": 25
+        "__id__": 22
       }
       }
     ],
     ],
     "_prefab": {
     "_prefab": {
-      "__id__": 26
+      "__id__": 23
     },
     },
     "_opacity": 255,
     "_opacity": 255,
     "_color": {
     "_color": {
@@ -786,17 +675,17 @@
     "_name": "lbt_num",
     "_name": "lbt_num",
     "_objFlags": 0,
     "_objFlags": 0,
     "_parent": {
     "_parent": {
-      "__id__": 20
+      "__id__": 17
     },
     },
     "_children": [],
     "_children": [],
     "_active": true,
     "_active": true,
     "_components": [
     "_components": [
       {
       {
-        "__id__": 22
+        "__id__": 19
       }
       }
     ],
     ],
     "_prefab": {
     "_prefab": {
-      "__id__": 23
+      "__id__": 20
     },
     },
     "_opacity": 255,
     "_opacity": 255,
     "_color": {
     "_color": {
@@ -850,7 +739,7 @@
     "_name": "",
     "_name": "",
     "_objFlags": 0,
     "_objFlags": 0,
     "node": {
     "node": {
-      "__id__": 21
+      "__id__": 18
     },
     },
     "_enabled": true,
     "_enabled": true,
     "_materials": [
     "_materials": [
@@ -894,7 +783,7 @@
     "_name": "",
     "_name": "",
     "_objFlags": 0,
     "_objFlags": 0,
     "node": {
     "node": {
-      "__id__": 20
+      "__id__": 17
     },
     },
     "_enabled": true,
     "_enabled": true,
     "_materials": [
     "_materials": [
@@ -926,7 +815,7 @@
     "_name": "",
     "_name": "",
     "_objFlags": 0,
     "_objFlags": 0,
     "node": {
     "node": {
-      "__id__": 20
+      "__id__": 17
     },
     },
     "_enabled": true,
     "_enabled": true,
     "alignMode": 1,
     "alignMode": 1,
@@ -971,18 +860,17 @@
       "__id__": 2
       "__id__": 2
     },
     },
     "lbt_num": {
     "lbt_num": {
-      "__id__": 9
+      "__id__": 19
     },
     },
     "lbt_key": {
     "lbt_key": {
-      "__id__": 17
+      "__id__": 14
     },
     },
     "sp_item": {
     "sp_item": {
       "__id__": 5
       "__id__": 5
     },
     },
     "node_emitter_num": {
     "node_emitter_num": {
-      "__id__": 20
+      "__id__": 17
     },
     },
-    "node_select": null,
     "_id": ""
     "_id": ""
   },
   },
   {
   {

+ 5 - 1
assets/json/dropData.json

@@ -1,3 +1,7 @@
 [
 [
-  {}
+  {"id":20001,"detailType":0,"items":[2,10101,1,100,2,10102,1,100,2,10103,1,100,2,10104,1,100]},
+  {"id":30001,"detailType":1,"items":[1,101,5000,1000,1,102,100,500]},
+  {"id":30002,"detailType":1,"items":[2,10101,1000,2,10102,1000,2,10103,1000,2,10104,1000]},
+  {"id":30003,"detailType":1,"items":[1,101,5000,1000,1,102,100,500]},
+  {"id":30004,"detailType":1,"items":[2,10101,1000,2,10102,1000,2,10103,1000,2,10104,1000]}
 ]
 ]

+ 6 - 6
assets/json/emitterInfo.json

@@ -1,8 +1,8 @@
 [
 [
-  {"id":10001,"name":"基础发射器","icon":"merge_20108","quality":0,"type":1,"upLimit":200,"restoreInterval":1,"restoreNum":[1800,40],"demand":null,"chargingType":0,"chargingCost":null,"expiryTime":0,"price":0},
-  {"id":20001,"name":"小狗","icon":"","quality":0,"type":2,"upLimit":6,"restoreInterval":0,"restoreNum":null,"demand":[2,10101,1,2,10102,1,2,10103,1],"chargingType":0,"chargingCost":null,"expiryTime":0,"price":0},
-  {"id":30001,"name":"科学家","icon":"","quality":0,"type":3,"upLimit":1,"restoreInterval":0,"restoreNum":null,"demand":[1,101,500,2,10102,2],"chargingType":0,"chargingCost":null,"expiryTime":180,"price":0},
-  {"id":40001,"name":"井盖","icon":"","quality":0,"type":4,"upLimit":3,"restoreInterval":2,"restoreNum":[180,3],"demand":null,"chargingType":0,"chargingCost":null,"expiryTime":0,"price":0},
-  {"id":40002,"name":"井盖1","icon":"","quality":0,"type":4,"upLimit":5,"restoreInterval":3,"restoreNum":[40001],"demand":null,"chargingType":0,"chargingCost":null,"expiryTime":0,"price":0},
-  {"id":500001,"name":"怪物发射器","icon":"merge_71205","quality":0,"type":50,"upLimit":10,"restoreInterval":0,"restoreNum":null,"demand":null,"chargingType":0,"chargingCost":null,"expiryTime":0,"price":0}
+  {"id":10001,"name":"基础发射器","icon":"merge_20108","quality":0,"type":1,"upLimit":200,"restoreInterval":1,"restoreNum":[1800,40],"dropId":20001,"demand":null,"chargingType":0,"chargingCost":null,"expiryTime":0,"price":0},
+  {"id":20001,"name":"小狗","icon":"","quality":0,"type":2,"upLimit":6,"restoreInterval":0,"restoreNum":null,"dropId":30002,"demand":[2,10101,1,2,10102,1,2,10103,1],"chargingType":0,"chargingCost":null,"expiryTime":0,"price":0},
+  {"id":30001,"name":"科学家","icon":"","quality":0,"type":3,"upLimit":1,"restoreInterval":0,"restoreNum":null,"dropId":30001,"demand":[1,101,500,2,10102,2],"chargingType":0,"chargingCost":null,"expiryTime":180,"price":0},
+  {"id":40001,"name":"井盖","icon":"","quality":0,"type":4,"upLimit":3,"restoreInterval":2,"restoreNum":[180,3],"dropId":30003,"demand":null,"chargingType":0,"chargingCost":null,"expiryTime":0,"price":0},
+  {"id":40002,"name":"井盖1","icon":"","quality":0,"type":4,"upLimit":5,"restoreInterval":3,"restoreNum":[40001],"dropId":30004,"demand":null,"chargingType":0,"chargingCost":null,"expiryTime":0,"price":0},
+  {"id":500001,"name":"怪物发射器","icon":"merge_71205","quality":0,"type":50,"upLimit":10,"restoreInterval":0,"restoreNum":null,"dropId":0,"demand":null,"chargingType":0,"chargingCost":null,"expiryTime":0,"price":0}
 ]
 ]

+ 12 - 12
assets/script/common/xlsConfig.ts

@@ -8,9 +8,9 @@ export type xlsAudioInfo = {id:string,name:string,vol:number}
 export type xlsChapterInfo = {id:number,grid:number[],map:string,name:string}
 export type xlsChapterInfo = {id:number,grid:number[],map:string,name:string}
 export type xlsChapterLayout = {id:number,infoId:number,grid:number,type:number,correlationId:number}
 export type xlsChapterLayout = {id:number,infoId:number,grid:number,type:number,correlationId:number}
 // type for drop.excel
 // type for drop.excel
-export type xlsDropData = {}
+export type xlsDropData = {id:number,detailType:number,items:number[]}
 // type for emitter.excel
 // type for emitter.excel
-export type xlsEmitterInfo = {id:number,name:string,icon:string,quality:number,type:number,upLimit:number,restoreInterval:number,restoreNum:number[],demand:number[],chargingType:number,chargingCost:number[],expiryTime:number,price:number}
+export type xlsEmitterInfo = {id:number,name:string,icon:string,quality:number,type:number,upLimit:number,restoreInterval:number,restoreNum:number[],dropId:number,demand:number[],chargingType:number,chargingCost:number[],expiryTime:number,price:number}
 export type xlsEmitterBasicLevel = {id:string}
 export type xlsEmitterBasicLevel = {id:string}
 // type for equip.excel
 // type for equip.excel
 export type xlsEquipInfo = {id:number,name:string,icon:string,desc:string,quality:number,price:number}
 export type xlsEquipInfo = {id:number,name:string,icon:string,desc:string,quality:number,price:number}
@@ -53,29 +53,29 @@ export type xlsTaskMain = {id:string,nextid:string,kind:string,need:number,item:
 // type for wing.excel
 // type for wing.excel
 
 
 export class XlsConfig {
 export class XlsConfig {
+    xlsDropData: xlsDropData[]
+    xlsAttrAttr: xlsAttrAttr[]
     xlsEquipInfo: xlsEquipInfo[]
     xlsEquipInfo: xlsEquipInfo[]
     xlsAudioInfo: xlsAudioInfo[]
     xlsAudioInfo: xlsAudioInfo[]
-    xlsDropData: xlsDropData[]
     xlsEmitterInfo: xlsEmitterInfo[]
     xlsEmitterInfo: xlsEmitterInfo[]
     xlsEmitterBasicLevel: xlsEmitterBasicLevel[]
     xlsEmitterBasicLevel: xlsEmitterBasicLevel[]
+    xlsKaiqiInfo: xlsKaiqiInfo[]
+    xlsGuideInfo: xlsGuideInfo[]
     xlsItemKind: xlsItemKind[]
     xlsItemKind: xlsItemKind[]
     xlsItemInfo: xlsItemInfo[]
     xlsItemInfo: xlsItemInfo[]
-    xlsAttrAttr: xlsAttrAttr[]
+    xlsPackageInfo: xlsPackageInfo[]
     xlsChapterInfo: xlsChapterInfo[]
     xlsChapterInfo: xlsChapterInfo[]
     xlsChapterLayout: xlsChapterLayout[]
     xlsChapterLayout: xlsChapterLayout[]
-    xlsKaiqiInfo: xlsKaiqiInfo[]
+    xlsNameName: xlsNameName[]
     xlsLanguageClientText: xlsLanguageClientText[]
     xlsLanguageClientText: xlsLanguageClientText[]
-    xlsLevelLevel: xlsLevelLevel[]
-    xlsLanguageSeverHouduan: xlsLanguageSeverHouduan[]
     xlsPingbiciInfo: xlsPingbiciInfo[]
     xlsPingbiciInfo: xlsPingbiciInfo[]
-    xlsNameName: xlsNameName[]
-    xlsMergePropInfo: xlsMergePropInfo[]
     xlsMergeInfo: xlsMergeInfo[]
     xlsMergeInfo: xlsMergeInfo[]
-    xlsGuideInfo: xlsGuideInfo[]
+    xlsMergePropInfo: xlsMergePropInfo[]
+    xlsLanguageSeverHouduan: xlsLanguageSeverHouduan[]
+    xlsLevelLevel: xlsLevelLevel[]
+    xlsMathInfo: xlsMathInfo[]
     xlsTaskDesc: xlsTaskDesc[]
     xlsTaskDesc: xlsTaskDesc[]
     xlsTaskMain: xlsTaskMain[]
     xlsTaskMain: xlsTaskMain[]
-    xlsMathInfo: xlsMathInfo[]
-    xlsPackageInfo: xlsPackageInfo[]
     xlsLanguageLang: xlsLanguageLang[]
     xlsLanguageLang: xlsLanguageLang[]
 
 
     constructor(bundleName:string, callback: Function, progressCallback?: Function) {
     constructor(bundleName:string, callback: Function, progressCallback?: Function) {

+ 19 - 5
assets/script/data/model/GridMap/GridMapModel.ts

@@ -12,6 +12,8 @@ import UECube from "../../../logic/gridMap/UECube";
 import { ReqHcEmit } from "../../../shared/hc/PtlHcEmit";
 import { ReqHcEmit } from "../../../shared/hc/PtlHcEmit";
 import { GridConstant } from "../../../logic/gridMap/GridConstant";
 import { GridConstant } from "../../../logic/gridMap/GridConstant";
 import Config from "../../../Config";
 import Config from "../../../Config";
+import { MsgHcTili_s } from "../../../shared/hc/server/MsgHcTili_s";
+import { MsgHcGeziInfo_s } from "../../../shared/hc/server/MsgHcGeziInfo_s";
 
 
 /** 合成物品数据 */
 /** 合成物品数据 */
 export interface MergeItem {
 export interface MergeItem {
@@ -31,8 +33,8 @@ export default class GridMapModel extends GridMapModelData {
     }
     }
 
 
     protected onRegister(): void {
     protected onRegister(): void {
-
-
+        GameDataCenter.gameServer.ListenMsg('hc/server/HcTili_s', this.OnHcTili, this);
+        GameDataCenter.gameServer.ListenMsg('hc/server/HcGeziInfo_s', this.OnHcGeziInfo, this);
     }
     }
 
 
     Init(ueGridMap: UEGridMap) {
     Init(ueGridMap: UEGridMap) {
@@ -41,6 +43,17 @@ export default class GridMapModel extends GridMapModelData {
 
 
     }
     }
 
 
+    OnHcTili(data: MsgHcTili_s) {
+        this.hcInfo.tili = data.tili;
+        this.hcInfo.maxTili = data.maxTili;
+        this.hcInfo.lastTime = data.lastTime;
+        EventMng.emit(GridEvent.HC_SP_UP);
+    }
+
+    OnHcGeziInfo(data: MsgHcGeziInfo_s) {
+
+    }
+
     /** 过滤合成链 */
     /** 过滤合成链 */
     FilterMergeChain() {
     FilterMergeChain() {
         this.formulaMap = {};
         this.formulaMap = {};
@@ -90,9 +103,10 @@ export default class GridMapModel extends GridMapModelData {
         if (ret?.res) {
         if (ret?.res) {
             for (let key in ret.res) {
             for (let key in ret.res) {
                 if (Number(key) != gzid) {
                 if (Number(key) != gzid) {
-                    EventMng.emit(GridEvent.TRIGGER_EMITTER, { idx: gzid, targetIdx: Number(key), item: ret.res[key] });
+                    EventMng.emit(GridEvent.TRIGGER_EMITTER, { idx: gzid, targetIdx: Number(key), info: ret.res[key] });
                 }
                 }
             }
             }
+            EventMng.emit(GridEvent.HC_EMITTER_REFRESH, { idx: gzid, info: ret.res[gzid.toString()] });
         }
         }
 
 
     }
     }
@@ -211,7 +225,7 @@ export default class GridMapModel extends GridMapModelData {
 
 
     /** 是否可以合成 */
     /** 是否可以合成 */
     private CanMergeItems(fromCell: UECell, toCell: UECell): boolean {
     private CanMergeItems(fromCell: UECell, toCell: UECell): boolean {
-        let formulaKey = `${fromCell.GetCube().GetCubeData().type}_${fromCell.GetCube().GetCubeData().id}_${toCell.GetCube().GetCubeData().type}_${toCell.GetCube().GetCubeData().id}`;
+        let formulaKey = `${fromCell.GetCube().GetCubeData().info.type}_${fromCell.GetCube().GetCubeData().info.correlationId}_${toCell.GetCube().GetCubeData().info.type}_${toCell.GetCube().GetCubeData().info.correlationId}`;
         let mergeArr = this.formulaMap[formulaKey];
         let mergeArr = this.formulaMap[formulaKey];
         if (gameMethod.isEmpty(mergeArr)) {
         if (gameMethod.isEmpty(mergeArr)) {
             return false;
             return false;
@@ -221,7 +235,7 @@ export default class GridMapModel extends GridMapModelData {
 
 
     /** 获取可合成的物品集 */
     /** 获取可合成的物品集 */
     public GetMergeItems(cube1: UECube, cube2: UECube) {
     public GetMergeItems(cube1: UECube, cube2: UECube) {
-        let formulaKey = `${cube1.GetCubeData().type}_${cube1.GetCubeData().id}_${cube2.GetCubeData().type}_${cube2.GetCubeData().id}`;
+        let formulaKey = `${cube1.GetCubeData().info.type}_${cube1.GetCubeData().info.correlationId}_${cube2.GetCubeData().info.type}_${cube2.GetCubeData().info.correlationId}`;
         let mergeArr = this.formulaMap[formulaKey];
         let mergeArr = this.formulaMap[formulaKey];
         return mergeArr || [];
         return mergeArr || [];
     }
     }

+ 4 - 0
assets/script/logic/fgui/Home/Home/HomeCtrl.ts

@@ -116,4 +116,8 @@ export class HomeCtrl extends FguiViewCtrl<HomeVM> {
         // tipsItem.touchable = false;
         // tipsItem.touchable = false;
         // return tipsItem;
         // return tipsItem;
     }
     }
+
+    OnUpdate(elapseTime: number): void {
+        this.HomeMergeBottom.OnUpdate(elapseTime);
+    }
 }
 }

+ 3 - 0
assets/script/logic/fgui/Home/Home/HomeMergeBottom.ts

@@ -23,4 +23,7 @@ export default class HomeMergeBottom {
     }
     }
 
 
 
 
+    public OnUpdate(dt: number) {
+        this.MergeDetailCom.OnUpdate(dt);
+    }
 }
 }

+ 100 - 34
assets/script/logic/fgui/Home/Home/HomeMergeDetailCom.ts

@@ -2,9 +2,12 @@ import Gamecfg from "../../../../common/gameCfg";
 import GameDataCenter from "../../../../data/GameDataCenter";
 import GameDataCenter from "../../../../data/GameDataCenter";
 import { MergeItem } from "../../../../data/model/GridMap/GridMapModel";
 import { MergeItem } from "../../../../data/model/GridMap/GridMapModel";
 import ResSprite from "../../../../frameWork/compment/ResSprite";
 import ResSprite from "../../../../frameWork/compment/ResSprite";
+import { ListUtil } from "../../../../frameWork/fgui/ListUtil";
 import EventMng from "../../../../manager/EventMng";
 import EventMng from "../../../../manager/EventMng";
 import { HcType } from "../../../../shared/hc/PtlHcInfo";
 import { HcType } from "../../../../shared/hc/PtlHcInfo";
+import { showTime } from "../../../../utils/Formula";
 import { I18n } from "../../../../utils/I18nUtil";
 import { I18n } from "../../../../utils/I18nUtil";
+import { uiCommon } from "../../../../utils/UICommon";
 import { GridEvent } from "../../../gridMap/GridEvent";
 import { GridEvent } from "../../../gridMap/GridEvent";
 import { I_CubeData } from "../../../gridMap/UECube";
 import { I_CubeData } from "../../../gridMap/UECube";
 
 
@@ -22,6 +25,9 @@ export default class HomeMergeDetailCom {
     private TypeCtr: fgui.Controller;
     private TypeCtr: fgui.Controller;
     private ShowLvCtr: fgui.Controller;
     private ShowLvCtr: fgui.Controller;
     private NameLabel: fgui.GTextField;
     private NameLabel: fgui.GTextField;
+    private ItemListUtil: ListUtil;
+    private SpeedBtn: fgui.GButton;
+    private TimeLabel: fgui.GTextField;
     data: MergeSellData;
     data: MergeSellData;
     static instance: HomeMergeDetailCom;
     static instance: HomeMergeDetailCom;
     public constructor(vm: fgui.GComponent) {
     public constructor(vm: fgui.GComponent) {
@@ -34,6 +40,9 @@ export default class HomeMergeDetailCom {
         this.TypeCtr = vm.getController('TypeCtr');
         this.TypeCtr = vm.getController('TypeCtr');
         this.ShowLvCtr = vm.getController('ShowLvCtr');
         this.ShowLvCtr = vm.getController('ShowLvCtr');
         this.NameLabel = vm.getChild('NameLabel').asTextField;
         this.NameLabel = vm.getChild('NameLabel').asTextField;
+        this.SpeedBtn = vm.getChild('SpeedBtn').asButton;
+        this.TimeLabel = this.SpeedBtn.getChild('TimeLabel').asTextField;
+        this.ItemListUtil = new ListUtil(vm.getChild('ItemList').asList);
     }
     }
 
 
     public onEnable(): void {
     public onEnable(): void {
@@ -61,44 +70,101 @@ export default class HomeMergeDetailCom {
         this.data = data;
         this.data = data;
         this._vm.visible = data.isShow;
         this._vm.visible = data.isShow;
         if (data.isShow) {
         if (data.isShow) {
-            let quality = 0;
             this.SellBtn.visible = false;
             this.SellBtn.visible = false;
-            if (data.item.type == HcType.emitter) {
-                let mergePropCfg = Gamecfg.emitterInfo.getItem(data.item.id.toString());
-                this.sp_item.setSpriteFrame('gridMap', `mergeProp/${mergePropCfg.icon}`);
-                quality = mergePropCfg.quality;
-                this.TypeCtr.selectedIndex = 1;
-                this.ShowLvCtr.selectedIndex = 0;
-                this.NameLabel.text = I18n.getI18nLang(mergePropCfg.name);
-            } else if (data.item.type == HcType.material) {
-                let mergePropCfg = Gamecfg.mergePropInfo.getItem(data.item.id.toString());
-                this.sp_item.setSpriteFrame('gridMap', `mergeProp/${mergePropCfg.icon}`);
-                quality = mergePropCfg.quality;
-                this.SellBtn.title = mergePropCfg.price.toString();
-                this.SellBtn.visible = true;
-                this.TypeCtr.selectedIndex = 0;
-                this.ShowLvCtr.selectedIndex = 1;
-                this.NameLabel.text = I18n.getI18nLang(mergePropCfg.name);
-            } else if (data.item.type == HcType.equip) {
-                let mergePropCfg = Gamecfg.equipInfo.getItem(data.item.id.toString());
-                this.sp_item.setSpriteFrame('gridMap', `mergeEquip/${mergePropCfg.icon}`);
-                quality = mergePropCfg.quality;
-                // this.SellBtn.title = mergePropCfg.price.toString();
-                this.SellBtn.visible = true;
-                this.TypeCtr.selectedIndex = 2;
-                this.NameLabel.text = I18n.getI18nLang(mergePropCfg.name);
-            } else if (data.item.type == HcType.user) {
-
-            } else if (data.item.type == HcType.monster) {
+            if (data.item.info.type == HcType.emitter) {
+                this.ShowEmitterDetail();
+            } else if (data.item.info.type == HcType.material) {
+                this.ShowMateriaDetail();
+            } else if (data.item.info.type == HcType.equip) {
+                this.ShowEquipDetail();
+            } else if (data.item.info.type == HcType.user) {
+
+            } else if (data.item.info.type == HcType.monster) {
 
 
             }
             }
-            if (quality > 0) {
-                this.QualityLoad.url = `ui://Home/Img_zjm_xqpinzhi0${quality - 1}`;
-                this.QualityLabel.text = `T${quality}`;
-            } else {
-                this.QualityLoad.url = ``;
-            }
+        }
+    }
+
+    private ChangeQuality(quality: number) {
+        if (quality > 0) {
+            this.QualityLoad.url = `ui://Home/Img_zjm_xqpinzhi0${quality - 1}`;
+            this.QualityLabel.text = `T${quality}`;
+        } else {
+            this.QualityLoad.url = ``;
+        }
+    }
+
+    private ShowEmitterDetail(): void {
+        let cfg = Gamecfg.emitterInfo.getItem(this.data.item.info.correlationId.toString());
+        this.sp_item.setSpriteFrame('gridMap', `mergeProp/${cfg.icon}`);
+        let quality = cfg.quality;
+        this.ChangeQuality(quality);
+        this.TypeCtr.selectedIndex = 1;
+        this.ShowLvCtr.selectedIndex = 0;
+        this.NameLabel.text = I18n.getI18nLang(cfg.name);
+        if (cfg.dropId) {
+            let dropCfg = Gamecfg.dropData.getItem(cfg.dropId.toString());
+            let arr: MergeItem[] = [];
+            let chunks = uiCommon.SplitArrayIntoChunks(dropCfg.items, 4);
+            chunks.forEach(element => {
+                arr.push({
+                    type: element[0],
+                    id: element[1],
+                    rate: element[3],
+                })
+            });
+
+            this.ItemListUtil.refreshItems(arr, { showRate: false });
+        }
+
+        this.TimeLabel.text = showTime(this.data.item.info.emitter?.lastTime);
+    }
+
+    private ShowMateriaDetail() {
+        let mergePropCfg = Gamecfg.mergePropInfo.getItem(this.data.item.info.correlationId.toString());
+        this.sp_item.setSpriteFrame('gridMap', `mergeProp/${mergePropCfg.icon}`);
+        let quality = mergePropCfg.quality;
+        this.SellBtn.title = mergePropCfg.price.toString();
+        this.SellBtn.visible = true;
+        this.TypeCtr.selectedIndex = 0;
+        this.ShowLvCtr.selectedIndex = 1;
+        this.NameLabel.text = I18n.getI18nLang(mergePropCfg.name);
+        this.ChangeQuality(quality);
+    }
 
 
+    private ShowEquipDetail() {
+        let mergePropCfg = Gamecfg.equipInfo.getItem(this.data.item.info.correlationId.toString());
+        this.sp_item.setSpriteFrame('gridMap', `mergeEquip/${mergePropCfg.icon}`);
+        let quality = mergePropCfg.quality;
+        // this.SellBtn.title = mergePropCfg.price.toString();
+        this.SellBtn.visible = true;
+        this.TypeCtr.selectedIndex = 2;
+        this.NameLabel.text = I18n.getI18nLang(mergePropCfg.name);
+        this.ChangeQuality(quality);
+    }
+
+    public OnUpdate(dt: number) {
+        if (this.data?.isShow) {
+            if (this.data.item.info.type == HcType.emitter) {
+                let cfg = Gamecfg.emitterInfo.getItem(this.data.item.info.correlationId.toString());
+                if (cfg.restoreNum) {
+                    if (cfg.upLimit && this.data.item.info.emitter.tili >= cfg.upLimit) {
+                        this.TimeLabel.text = '已满';
+                        this.SpeedBtn.grayed = true;
+                        return;
+                    }
+                    let leastTime = Date.now() / 1000 - this.data.item.info.emitter?.lastTime;
+
+                    let time = cfg.restoreNum[0] - leastTime;
+                    if (time > 0) {
+                        this.TimeLabel.text = showTime(time, "3");
+                        this.SpeedBtn.grayed = false;
+                    } else {
+                        this.TimeLabel.text = '已满';
+                        this.SpeedBtn.grayed = true;
+                    }
+                }
+            }
         }
         }
     }
     }
 }
 }

+ 1 - 0
assets/script/logic/gridMap/GridEvent.ts

@@ -3,6 +3,7 @@
 export class GridEvent {
 export class GridEvent {
     static readonly HC_INFO_RSP = "HC_INFO_RSP";//接收棋盘信息
     static readonly HC_INFO_RSP = "HC_INFO_RSP";//接收棋盘信息
     static readonly TRIGGER_EMITTER = "TRIGGER_EMITTER";//触发发射器生成道具
     static readonly TRIGGER_EMITTER = "TRIGGER_EMITTER";//触发发射器生成道具
+    static readonly HC_EMITTER_REFRESH = "HC_EMITTER_REFRESH";//触发器刷新状态
     static readonly HC_SP_UP = "HC_SP_UP";//体力刷新
     static readonly HC_SP_UP = "HC_SP_UP";//体力刷新
     static readonly HC_MERGE_TIP = "HC_MERGE_TIP";//合成提示
     static readonly HC_MERGE_TIP = "HC_MERGE_TIP";//合成提示
     static readonly HC_MERGE_DETAIL = "HC_MERGE_SELL";//合成物品售卖
     static readonly HC_MERGE_DETAIL = "HC_MERGE_SELL";//合成物品售卖

+ 3 - 4
assets/script/logic/gridMap/UECell.ts

@@ -61,9 +61,8 @@ export default class UECell extends UEBase {
         cube.node.setPosition(pos);
         cube.node.setPosition(pos);
         let idx = (this.cellData.x + 1) * 10 + (this.cellData.y + 1);
         let idx = (this.cellData.x + 1) * 10 + (this.cellData.y + 1);
         cube.Init({
         cube.Init({
-            type: info.type,
-            id: info.correlationId,
-            idx: idx
+            idx: idx,
+            info: info,
         })
         })
         this.ueCube = cube;
         this.ueCube = cube;
         this.SetQuality();
         this.SetQuality();
@@ -78,7 +77,7 @@ export default class UECell extends UEBase {
 
 
     SetQuality() {
     SetQuality() {
         if (this.ueCube && !this.IsLock()) {
         if (this.ueCube && !this.IsLock()) {
-            this.ueCube.SetZIndex(this.cellData.idx);
+            this.ueCube.SetIdx(this.cellData.idx);
             let quality = this.ueCube.GetQuality();
             let quality = this.ueCube.GetQuality();
             this.sp_quality.setSpriteFrame('gridMap', `qualityBg/Img_zjm_diban0${quality}`);
             this.sp_quality.setSpriteFrame('gridMap', `qualityBg/Img_zjm_diban0${quality}`);
         } else {
         } else {

+ 38 - 25
assets/script/logic/gridMap/UECube.ts

@@ -2,21 +2,21 @@ import Gamecfg from "../../common/gameCfg";
 import GameDataCenter from "../../data/GameDataCenter";
 import GameDataCenter from "../../data/GameDataCenter";
 import ResSprite from "../../frameWork/compment/ResSprite";
 import ResSprite from "../../frameWork/compment/ResSprite";
 import UEBase from "../../frameWork/compment/UEBase";
 import UEBase from "../../frameWork/compment/UEBase";
-import { HcType } from "../../shared/hc/PtlHcInfo";
+import EventMng from "../../manager/EventMng";
+import { HcInfoGeziEmitter, HcInfoGeziInfo, HcType } from "../../shared/hc/PtlHcInfo";
 import AssetMgr from "../../utils/AssetMgr";
 import AssetMgr from "../../utils/AssetMgr";
 import { uiCommon } from "../../utils/UICommon";
 import { uiCommon } from "../../utils/UICommon";
 import { GridConstant } from "./GridConstant";
 import { GridConstant } from "./GridConstant";
+import { GridEvent } from "./GridEvent";
 import UEHomeRole from "./UEHomeRole";
 import UEHomeRole from "./UEHomeRole";
 
 
 const { ccclass, property } = cc._decorator;
 const { ccclass, property } = cc._decorator;
 
 
 export interface I_CubeData {
 export interface I_CubeData {
-    /** 物品类型 */
-    type: HcType;
-    /** 物品ID */
-    id: number;
     /** 位置索引 */
     /** 位置索引 */
     idx: number;
     idx: number;
+    /* 棋子信息*/
+    info: HcInfoGeziInfo;
 }
 }
 @ccclass
 @ccclass
 export default class UECube extends UEBase {
 export default class UECube extends UEBase {
@@ -39,31 +39,44 @@ export default class UECube extends UEBase {
     ueHomeRole: UEHomeRole = null!;
     ueHomeRole: UEHomeRole = null!;
     Init(cubeData: I_CubeData) {
     Init(cubeData: I_CubeData) {
         this.cubeData = cubeData;
         this.cubeData = cubeData;
-        this.SetZIndex(cubeData.idx);
+        this.SetIdx(cubeData.idx);
         this.node_emitter_num.active = false;
         this.node_emitter_num.active = false;
-        if (cubeData.type == HcType.emitter) {
-            let mergePropCfg = Gamecfg.emitterInfo.getItem(cubeData.id.toString());
+        if (cubeData.info.type == HcType.emitter) {
+            let mergePropCfg = Gamecfg.emitterInfo.getItem(cubeData.info.correlationId.toString());
             this.sp_item.setSpriteFrame('gridMap', `mergeProp/${mergePropCfg.icon}`);
             this.sp_item.setSpriteFrame('gridMap', `mergeProp/${mergePropCfg.icon}`);
             this.quality = mergePropCfg.quality;
             this.quality = mergePropCfg.quality;
             this.node_emitter_num.active = true;
             this.node_emitter_num.active = true;
-        } else if (cubeData.type == HcType.material) {
-            let mergePropCfg = Gamecfg.mergePropInfo.getItem(cubeData.id.toString());
+            this.lbt_num.string = cubeData.info.emitter?.tili + "";
+        } else if (cubeData.info.type == HcType.material) {
+            let mergePropCfg = Gamecfg.mergePropInfo.getItem(cubeData.info.correlationId.toString());
             this.sp_item.setSpriteFrame('gridMap', `mergeProp/${mergePropCfg.icon}`);
             this.sp_item.setSpriteFrame('gridMap', `mergeProp/${mergePropCfg.icon}`);
             this.quality = mergePropCfg.quality;
             this.quality = mergePropCfg.quality;
-        } else if (cubeData.type == HcType.equip) {
-            let mergePropCfg = Gamecfg.equipInfo.getItem(cubeData.id.toString());
+        } else if (cubeData.info.type == HcType.equip) {
+            let mergePropCfg = Gamecfg.equipInfo.getItem(cubeData.info.correlationId.toString());
             this.sp_item.setSpriteFrame('gridMap', `mergeEquip/${mergePropCfg.icon}`);
             this.sp_item.setSpriteFrame('gridMap', `mergeEquip/${mergePropCfg.icon}`);
             this.quality = mergePropCfg.quality;
             this.quality = mergePropCfg.quality;
-        } else if (cubeData.type == HcType.user) {
+        } else if (cubeData.info.type == HcType.user) {
             this.ueHomeRole = AssetMgr.instantiateUE(UEHomeRole);
             this.ueHomeRole = AssetMgr.instantiateUE(UEHomeRole);
             this.itemNode.addChild(this.ueHomeRole.node);
             this.itemNode.addChild(this.ueHomeRole.node);
-            this.ueHomeRole.Init(cubeData);
-        } else if (cubeData.type == HcType.monster) {
+            this.ueHomeRole.Init(cubeData.info);
+        } else if (cubeData.info.type == HcType.monster) {
             this.ueHomeRole = AssetMgr.instantiateUE(UEHomeRole);
             this.ueHomeRole = AssetMgr.instantiateUE(UEHomeRole);
             this.itemNode.addChild(this.ueHomeRole.node);
             this.itemNode.addChild(this.ueHomeRole.node);
-            this.ueHomeRole.Init(cubeData);
+            this.ueHomeRole.Init(cubeData.info);
         }
         }
         // this.lbt_key.string = `${cubeData.type}_${cubeData.id}`;
         // this.lbt_key.string = `${cubeData.type}_${cubeData.id}`;
+        this.AddListeners();
+    }
+
+    private AddListeners(): void {
+        this.initEvent(GridEvent.HC_EMITTER_REFRESH, this.OnEmitterRefresh);
+    }
+
+    OnEmitterRefresh(data: { idx: number, info: HcInfoGeziInfo }) {
+        if (data.idx == this.cubeData.idx) {
+            this.cubeData.info = data.info;
+            this.lbt_num.string = data.info.emitter?.tili + "";
+        }
     }
     }
 
 
     /** 获取品质 */
     /** 获取品质 */
@@ -73,13 +86,13 @@ export default class UECube extends UEBase {
 
 
     /** 触发点击 */
     /** 触发点击 */
     TriggerClick() {
     TriggerClick() {
-        if (this.cubeData.type == HcType.emitter) {
+        if (this.cubeData.info.type == HcType.emitter) {
             CC_PREVIEW && console.log("触发点击发射器");
             CC_PREVIEW && console.log("触发点击发射器");
             GameDataCenter.gridMap.sendEmitter(this.cubeData.idx);
             GameDataCenter.gridMap.sendEmitter(this.cubeData.idx);
-        } else if (this.cubeData.type == HcType.monster) {
+        } else if (this.cubeData.info.type == HcType.monster) {
             CC_PREVIEW && console.log("点击怪物开始战斗");
             CC_PREVIEW && console.log("点击怪物开始战斗");
             GameDataCenter.gridMap.sendFightHc(this.cubeData.idx);
             GameDataCenter.gridMap.sendFightHc(this.cubeData.idx);
-        } else if (this.cubeData.type == HcType.equip) {
+        } else if (this.cubeData.info.type == HcType.equip) {
 
 
         }
         }
     }
     }
@@ -89,7 +102,7 @@ export default class UECube extends UEBase {
         return this.cubeData;
         return this.cubeData;
     }
     }
 
 
-    SetZIndex(zIndex: number) {
+    SetIdx(zIndex: number) {
         this.node.zIndex = zIndex;
         this.node.zIndex = zIndex;
         this.cubeData.idx = zIndex;
         this.cubeData.idx = zIndex;
         // this.lbt_num.string = zIndex.toString();
         // this.lbt_num.string = zIndex.toString();
@@ -97,7 +110,7 @@ export default class UECube extends UEBase {
 
 
     /** 是否有物品可以拖动 */
     /** 是否有物品可以拖动 */
     CanDrag(): boolean {
     CanDrag(): boolean {
-        if (this.cubeData.type == HcType.monster) return false;
+        if (this.cubeData.info.type == HcType.monster) return false;
         return true;
         return true;
     }
     }
 
 
@@ -146,10 +159,10 @@ export default class UECube extends UEBase {
     /** 播放合成动画 */
     /** 播放合成动画 */
     PlayMergeAnim() {
     PlayMergeAnim() {
         cc.tween(this.itemNode)
         cc.tween(this.itemNode)
-            .by(0.15, { position: cc.v3(0, 60) })
-            .by(0.13, { position: cc.v3(0, -60) })
-            .by(0.1, { position: cc.v3(0, 10) })
-            .by(0.1, { position: cc.v3(0, -10) })
+            .by(0.15, { position: cc.v3(0, 60) }, { easing: cc.easing.quadOut })
+            .by(0.13, { position: cc.v3(0, -60) }, { easing: cc.easing.quadIn })
+            .by(0.1, { position: cc.v3(0, 10) }, { easing: cc.easing.quadOut })
+            .by(0.1, { position: cc.v3(0, -10) }, { easing: cc.easing.quadIn })
             .start();
             .start();
     }
     }
 
 

+ 5 - 15
assets/script/logic/gridMap/UEGridMap.ts

@@ -135,12 +135,7 @@ export default class UEGridMap extends UEBase {
                 if (curCell.IsLock()) {
                 if (curCell.IsLock()) {
                     curCell.ChangeLockState(geziData.unlock);
                     curCell.ChangeLockState(geziData.unlock);
                 }
                 }
-                let mergeCube = curCell.CreateCube(geziData);
-                mergeCube.Init({
-                    type: geziData.type,
-                    id: geziData.correlationId,
-                    idx: Number(key),
-                });
+                curCell.CreateCube(geziData);
             }
             }
         }
         }
     }
     }
@@ -298,16 +293,11 @@ export default class UEGridMap extends UEBase {
     }
     }
 
 
     /** 发射出新的物品 */
     /** 发射出新的物品 */
-    private TriggerEmitter(data: { idx: number, item: HcInfoGeziInfo, targetIdx: number }) {
+    private TriggerEmitter(data: { idx: number, info: HcInfoGeziInfo, targetIdx: number }) {
         let targetCell = this.cellMap[data.targetIdx];
         let targetCell = this.cellMap[data.targetIdx];
         let startPos = GameDataCenter.gridMap.TranIdxToPos(data.idx);
         let startPos = GameDataCenter.gridMap.TranIdxToPos(data.idx);
-        let mergeCube = targetCell.CreateCube(data.item);
-        mergeCube.Init({
-            type: data.item.type,
-            id: data.item.correlationId,
-            idx: data.idx,
-        });
-        mergeCube.SetZIndex(1000);
+        let mergeCube = targetCell.CreateCube(data.info);
+        mergeCube.SetIdx(1000);
         let targetPos = GameDataCenter.gridMap.TranIdxToPos(data.targetIdx);
         let targetPos = GameDataCenter.gridMap.TranIdxToPos(data.targetIdx);
 
 
         // 计算起点和终点
         // 计算起点和终点
@@ -389,7 +379,7 @@ export default class UEGridMap extends UEBase {
             bezierAction2,
             bezierAction2,
             bezierAction3,
             bezierAction3,
             cc.callFunc(() => {
             cc.callFunc(() => {
-                mergeCube.SetZIndex(data.targetIdx);
+                mergeCube.SetIdx(data.targetIdx);
             })
             })
         );
         );
 
 

+ 3 - 7
assets/script/logic/gridMap/UEHomeRole.ts

@@ -1,13 +1,10 @@
 import ResSpine from "../../frameWork/compment/ResSpine";
 import ResSpine from "../../frameWork/compment/ResSpine";
 import UEBase from "../../frameWork/compment/UEBase";
 import UEBase from "../../frameWork/compment/UEBase";
-import { HcType } from "../../shared/hc/PtlHcInfo";
+import { HcInfoGeziInfo, HcType } from "../../shared/hc/PtlHcInfo";
 
 
 const { ccclass, property } = cc._decorator;
 const { ccclass, property } = cc._decorator;
 
 
-export interface I_HomeRoleData {
-    type: HcType;
-    id: number;
-}
+
 @ccclass
 @ccclass
 export default class UEHomeRole extends UEBase {
 export default class UEHomeRole extends UEBase {
     static readonly BundleKey: string = "gridMap";
     static readonly BundleKey: string = "gridMap";
@@ -18,8 +15,7 @@ export default class UEHomeRole extends UEBase {
     private node_spine: ResSpine = null!;
     private node_spine: ResSpine = null!;
 
 
 
 
-    data: I_HomeRoleData = null!;
-    Init(data: I_HomeRoleData) {
+    Init(data: HcInfoGeziInfo) {
 
 
         if (data.type == HcType.user) {
         if (data.type == HcType.user) {
 
 

+ 23 - 0
assets/script/shared/hc/PtlHcEmitterUpLv.ts

@@ -0,0 +1,23 @@
+import { HcInfoGeziInfo } from "./PtlHcInfo";
+
+
+/**
+* 请求接口 发射器升级
+*/
+export interface ReqHcEmitterUpLv {
+    gzid:string //格子id
+}
+
+/**
+* 返回信息
+*/
+export interface ResHcEmitterUpLv {
+    [gzid: string]: HcInfoGeziInfo;
+}
+
+export const conf = {
+    connet: "ws"
+}
+
+
+

+ 10 - 0
assets/script/shared/hc/PtlHcEmitterUpLv.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "03e8d102-c8f1-4aab-966c-15f557788a83",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 2 - 0
assets/script/shared/hc/PtlHcInfo.ts

@@ -34,6 +34,8 @@ export interface HcInfoGeziEmitter {
     tili:number  //剩余发射次数
     tili:number  //剩余发射次数
     lastTime:number  //最后一次回复时间 需要根据配置表的类型做判定
     lastTime:number  //最后一次回复时间 需要根据配置表的类型做判定
     level:number //发射器等级
     level:number //发射器等级
+    num:number  //升级次数
+    cfTime:number  //触发升级时间 0表示没在升级
 }
 }
 
 
 
 

+ 10 - 0
assets/script/shared/hc/server/MsgHcGeziInfo_s.ts

@@ -0,0 +1,10 @@
+import { HcInfoGeziInfo } from "../PtlHcInfo";
+
+
+/**
+ * msg推送信息  更新格子信息
+ */
+export interface MsgHcGeziInfo_s {
+    [gzid: string]: HcInfoGeziInfo;
+}
+

+ 10 - 0
assets/script/shared/hc/server/MsgHcGeziInfo_s.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "0e9a2495-8c3a-4741-8a3a-520e61c02e73",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 67 - 1
assets/script/shared/serviceProto.ts

@@ -37,9 +37,11 @@ import { MsgEpsChange_s } from './eps/server/MsgEpsChange_s';
 import { ReqFightHc, ResFightHc } from './fight/PtlFightHc';
 import { ReqFightHc, ResFightHc } from './fight/PtlFightHc';
 import { ReqFightTest, ResFightTest } from './fight/PtlFightTest';
 import { ReqFightTest, ResFightTest } from './fight/PtlFightTest';
 import { ReqHcEmit, ResHcEmit } from './hc/PtlHcEmit';
 import { ReqHcEmit, ResHcEmit } from './hc/PtlHcEmit';
+import { ReqHcEmitterUpLv, ResHcEmitterUpLv } from './hc/PtlHcEmitterUpLv';
 import { ReqHcInfo, ResHcInfo } from './hc/PtlHcInfo';
 import { ReqHcInfo, ResHcInfo } from './hc/PtlHcInfo';
 import { ReqHcMerge, ResHcMerge } from './hc/PtlHcMerge';
 import { ReqHcMerge, ResHcMerge } from './hc/PtlHcMerge';
 import { ReqHcSell, ResHcSell } from './hc/PtlHcSell';
 import { ReqHcSell, ResHcSell } from './hc/PtlHcSell';
+import { MsgHcGeziInfo_s } from './hc/server/MsgHcGeziInfo_s';
 import { MsgHcTili_s } from './hc/server/MsgHcTili_s';
 import { MsgHcTili_s } from './hc/server/MsgHcTili_s';
 import { ReqItemInfo, ResItemInfo } from './item/PtlItemInfo';
 import { ReqItemInfo, ResItemInfo } from './item/PtlItemInfo';
 import { MsgItemChange_s } from './item/server/MsgItemChange_s';
 import { MsgItemChange_s } from './item/server/MsgItemChange_s';
@@ -198,6 +200,10 @@ export interface ServiceType {
             req: ReqHcEmit,
             req: ReqHcEmit,
             res: ResHcEmit
             res: ResHcEmit
         },
         },
+        "hc/HcEmitterUpLv": {
+            req: ReqHcEmitterUpLv,
+            res: ResHcEmitterUpLv
+        },
         "hc/HcInfo": {
         "hc/HcInfo": {
             req: ReqHcInfo,
             req: ReqHcInfo,
             res: ResHcInfo
             res: ResHcInfo
@@ -272,6 +278,7 @@ export interface ServiceType {
         "common/ItemsRwd": MsgItemsRwd,
         "common/ItemsRwd": MsgItemsRwd,
         "common/Message": MsgMessage,
         "common/Message": MsgMessage,
         "eps/server/EpsChange_s": MsgEpsChange_s,
         "eps/server/EpsChange_s": MsgEpsChange_s,
+        "hc/server/HcGeziInfo_s": MsgHcGeziInfo_s,
         "hc/server/HcTili_s": MsgHcTili_s,
         "hc/server/HcTili_s": MsgHcTili_s,
         "item/server/ItemChange_s": MsgItemChange_s,
         "item/server/ItemChange_s": MsgItemChange_s,
         "mail/server/MailNew_s": MsgMailNew_s,
         "mail/server/MailNew_s": MsgMailNew_s,
@@ -281,7 +288,7 @@ export interface ServiceType {
 }
 }
 
 
 export const serviceProto: ServiceProto<ServiceType> = {
 export const serviceProto: ServiceProto<ServiceType> = {
-    "version": 71,
+    "version": 74,
     "services": [
     "services": [
         {
         {
             "id": 39,
             "id": 39,
@@ -576,6 +583,14 @@ export const serviceProto: ServiceProto<ServiceType> = {
             }
             }
         },
         },
         {
         {
+            "id": 102,
+            "name": "hc/HcEmitterUpLv",
+            "type": "api",
+            "conf": {
+                "connet": "ws"
+            }
+        },
+        {
             "id": 66,
             "id": 66,
             "name": "hc/HcInfo",
             "name": "hc/HcInfo",
             "type": "api",
             "type": "api",
@@ -600,6 +615,11 @@ export const serviceProto: ServiceProto<ServiceType> = {
             }
             }
         },
         },
         {
         {
+            "id": 101,
+            "name": "hc/server/HcGeziInfo_s",
+            "type": "msg"
+        },
+        {
             "id": 91,
             "id": 91,
             "name": "hc/server/HcTili_s",
             "name": "hc/server/HcTili_s",
             "type": "msg"
             "type": "msg"
@@ -2152,6 +2172,20 @@ export const serviceProto: ServiceProto<ServiceType> = {
                     "type": {
                     "type": {
                         "type": "Number"
                         "type": "Number"
                     }
                     }
+                },
+                {
+                    "id": 3,
+                    "name": "num",
+                    "type": {
+                        "type": "Number"
+                    }
+                },
+                {
+                    "id": 4,
+                    "name": "cfTime",
+                    "type": {
+                        "type": "Number"
+                    }
                 }
                 }
             ]
             ]
         },
         },
@@ -2192,6 +2226,28 @@ export const serviceProto: ServiceProto<ServiceType> = {
                 }
                 }
             }
             }
         },
         },
+        "hc/PtlHcEmitterUpLv/ReqHcEmitterUpLv": {
+            "type": "Interface",
+            "properties": [
+                {
+                    "id": 0,
+                    "name": "gzid",
+                    "type": {
+                        "type": "String"
+                    }
+                }
+            ]
+        },
+        "hc/PtlHcEmitterUpLv/ResHcEmitterUpLv": {
+            "type": "Interface",
+            "indexSignature": {
+                "keyType": "String",
+                "type": {
+                    "type": "Reference",
+                    "target": "hc/PtlHcInfo/HcInfoGeziInfo"
+                }
+            }
+        },
         "hc/PtlHcInfo/ReqHcInfo": {
         "hc/PtlHcInfo/ReqHcInfo": {
             "type": "Interface"
             "type": "Interface"
         },
         },
@@ -2341,6 +2397,16 @@ export const serviceProto: ServiceProto<ServiceType> = {
                 }
                 }
             ]
             ]
         },
         },
+        "hc/server/MsgHcGeziInfo_s/MsgHcGeziInfo_s": {
+            "type": "Interface",
+            "indexSignature": {
+                "keyType": "String",
+                "type": {
+                    "type": "Reference",
+                    "target": "hc/PtlHcInfo/HcInfoGeziInfo"
+                }
+            }
+        },
         "hc/server/MsgHcTili_s/MsgHcTili_s": {
         "hc/server/MsgHcTili_s/MsgHcTili_s": {
             "type": "Interface",
             "type": "Interface",
             "properties": [
             "properties": [

+ 7 - 0
assets/script/utils/UICommon.ts

@@ -1273,6 +1273,13 @@ class UICommon {
         // 返回中心点坐标  
         // 返回中心点坐标  
         return cc.v2(centroidX, centroidY);
         return cc.v2(centroidX, centroidY);
     }
     }
+
+    /** 将一维数组转换为num个一组的二维数组 */
+    public SplitArrayIntoChunks(items: any[], num: number): any[][] {
+        return Array.from({ length: Math.ceil(items.length / num) }, (_, i) =>
+            items.slice(i * num, (i + 1) * num)
+        );
+    }
 }
 }
 
 
 export class PopTipsCache {
 export class PopTipsCache {

+ 0 - 1
fgui-project/assets/Common/package.xml

@@ -130,7 +130,6 @@
     <component id="rnf9obap88" name="ItemBase.xml" path="/Components/" exported="true"/>
     <component id="rnf9obap88" name="ItemBase.xml" path="/Components/" exported="true"/>
     <image id="rnf918" name="Img_zjm_dikuang.png" path="/Images/" exported="true" scale="9grid" scale9grid="8,7,16,14" duplicatePadding="true" disableTrim="true"/>
     <image id="rnf918" name="Img_zjm_dikuang.png" path="/Images/" exported="true" scale="9grid" scale9grid="8,7,16,14" duplicatePadding="true" disableTrim="true"/>
     <font id="ski7obap8a" name="Alimama_ShuHeiTi_Bold.ttf" path="/Font/" exported="true" renderMode="" samplePointSize="16"/>
     <font id="ski7obap8a" name="Alimama_ShuHeiTi_Bold.ttf" path="/Font/" exported="true" renderMode="" samplePointSize="16"/>
-    <image id="vboaobap8b" name="xitongtishi.png" path="/Images/" exported="true" scale9grid="34,10,68,20"/>
   </resources>
   </resources>
   <publish name="" genCode="true">
   <publish name="" genCode="true">
     <atlas name="艺术字" compression="true" index="1"/>
     <atlas name="艺术字" compression="true" index="1"/>

+ 2 - 2
fgui-project/assets/Home/Components/HomeMergeDetail.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <?xml version="1.0" encoding="utf-8"?>
 <component size="750,264">
 <component size="750,264">
-  <controller name="TypeCtr" pages="0,,1,,2," selected="0">
+  <controller name="TypeCtr" pages="0,,1,,2," selected="1">
     <remark page="0" value="售卖"/>
     <remark page="0" value="售卖"/>
     <remark page="1" value="加速器"/>
     <remark page="1" value="加速器"/>
     <remark page="2" value="装备"/>
     <remark page="2" value="装备"/>
@@ -22,7 +22,7 @@
     <image id="n52_u7s3" name="n52" src="j5c83m" fileName="Images/home/Img_zjm_xiangqingdi00.png" xy="192,169" pivot="0,0.5" anchor="true" size="392,129" group="n63_u7s3"/>
     <image id="n52_u7s3" name="n52" src="j5c83m" fileName="Images/home/Img_zjm_xiangqingdi00.png" xy="192,169" pivot="0,0.5" anchor="true" size="392,129" group="n63_u7s3"/>
     <component id="n53_u7s3" name="SpeedBtn" src="j5c83n" fileName="Components/MergeYellowBtn.xml" xy="664,193" pivot="0.5,0.5" anchor="true" size="132,79" group="n63_u7s3"/>
     <component id="n53_u7s3" name="SpeedBtn" src="j5c83n" fileName="Components/MergeYellowBtn.xml" xy="664,193" pivot="0.5,0.5" anchor="true" size="132,79" group="n63_u7s3"/>
     <component id="n54_u7s3" name="UpgradeBtn" src="u7s33v" fileName="Components/MergeUpgradeBtn.xml" xy="598,56" group="n63_u7s3"/>
     <component id="n54_u7s3" name="UpgradeBtn" src="u7s33v" fileName="Components/MergeUpgradeBtn.xml" xy="598,56" group="n63_u7s3"/>
-    <list id="n59_u7s3" name="n59" xy="211,169" pivot="0,0.5" anchor="true" size="373,130" group="n63_u7s3" layout="row" overflow="scroll" scroll="horizontal" colGap="3" defaultItem="ui://1xjqm8v2tt6aj" autoClearItems="true">
+    <list id="n59_u7s3" name="ItemList" xy="211,169" pivot="0,0.5" anchor="true" size="373,130" group="n63_u7s3" layout="row" overflow="scroll" scroll="horizontal" colGap="3" defaultItem="ui://1xjqm8v2tt6aj" autoClearItems="true">
       <item/>
       <item/>
       <item/>
       <item/>
       <item/>
       <item/>

+ 3 - 4
fgui-project/assets/Home/Components/MergeUpgradeBtn.xml

@@ -6,12 +6,11 @@
       <relation target="" sidePair="width-width,height-height"/>
       <relation target="" sidePair="width-width,height-height"/>
     </image>
     </image>
     <image id="n4_u7s3" name="n4" src="u7s33x" fileName="Images/home/Img_zjm_shijiandi.png" xy="28,53" pivot="0,0.5" anchor="true" size="77,24"/>
     <image id="n4_u7s3" name="n4" src="u7s33x" fileName="Images/home/Img_zjm_shijiandi.png" xy="28,53" pivot="0,0.5" anchor="true" size="77,24"/>
-    <text id="n1_j5c8" name="title" xy="36,1" size="59,39" fontSize="28" color="#ffffff" align="center" vAlign="middle" strokeColor="#000000" strokeSize="2" singleLine="true" text="加速">
-      <relation target="" sidePair="right-right,top-top"/>
-    </text>
-    <text id="n3_u7s3" name="CostLabel" xy="51,38" size="51,29" fontSize="20" color="#ffffff" vAlign="middle" strokeColor="#000000" strokeSize="2" singleLine="true" text="1500">
+    <text id="n1_j5c8" name="title" xy="36,1" size="59,39" fontSize="28" color="#ffffff" align="center" vAlign="middle" strokeColor="#000000" strokeSize="2" singleLine="true" text="升级">
       <relation target="" sidePair="right-right,top-top"/>
       <relation target="" sidePair="right-right,top-top"/>
     </text>
     </text>
+    <text id="n3_u7s3" name="CostLabel" xy="51,38" pivot="0,0.5" size="51,29" fontSize="20" color="#ffffff" vAlign="middle" strokeColor="#000000" strokeSize="2" singleLine="true" text="1500"/>
+    <loader id="n5_u7s3" name="n5" xy="39,53" pivot="0.5,0.5" anchor="true" size="30,30" url="ui://rd135cfrmiq9c" fill="scale"/>
   </displayList>
   </displayList>
   <Button downEffect="scale" downEffectValue=".8"/>
   <Button downEffect="scale" downEffectValue=".8"/>
 </component>
 </component>

+ 3 - 3
fgui-project/assets/Home/Components/MergeYellowBtn.xml

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
 <?xml version="1.0" encoding="utf-8"?>
-<component size="132,79" pivot="0.5,0.5" extention="Button" designImage="ui://1xjqm8v2u7s33t" designImageOffsetX="-597" designImageOffsetY="-1223" designImageAlpha="27" designImageLayer="1">
+<component size="132,79" pivot="0.5,0.5" extention="Button" designImage="ui://1xjqm8v2u7s33t" designImageOffsetX="-597" designImageOffsetY="-1223" designImageAlpha="0" designImageLayer="1">
   <controller name="button" pages="0,up,1,down,2,over,3,selectedOver" selected="0"/>
   <controller name="button" pages="0,up,1,down,2,over,3,selectedOver" selected="0"/>
   <displayList>
   <displayList>
     <image id="n0_j5c8" name="n0" src="rnf915" fileName="Images/home/Btn_zjm_anniuhuang.png" xy="0,0" size="132,79">
     <image id="n0_j5c8" name="n0" src="rnf915" fileName="Images/home/Btn_zjm_anniuhuang.png" xy="0,0" size="132,79">
@@ -9,8 +9,8 @@
     <text id="n1_j5c8" name="title" xy="36,1" size="59,39" fontSize="28" color="#ffffff" align="center" vAlign="middle" strokeColor="#000000" strokeSize="2" singleLine="true" text="加速">
     <text id="n1_j5c8" name="title" xy="36,1" size="59,39" fontSize="28" color="#ffffff" align="center" vAlign="middle" strokeColor="#000000" strokeSize="2" singleLine="true" text="加速">
       <relation target="" sidePair="right-right,top-top"/>
       <relation target="" sidePair="right-right,top-top"/>
     </text>
     </text>
-    <text id="n3_u7s3" name="TimeLabel" xy="36,38" size="59,29" fontSize="20" color="#ffffff" align="center" vAlign="middle" strokeColor="#000000" strokeSize="2" singleLine="true" text="05:30">
-      <relation target="" sidePair="right-right,top-top"/>
+    <text id="n3_u7s3" name="TimeLabel" xy="36,38" pivot="0.5,0.5" size="59,29" fontSize="20" color="#ffffff" align="center" vAlign="middle" strokeColor="#000000" strokeSize="2" singleLine="true" text="05:30">
+      <relation target="" sidePair="center-center"/>
     </text>
     </text>
   </displayList>
   </displayList>
   <Button downEffect="scale" downEffectValue=".8"/>
   <Button downEffect="scale" downEffectValue=".8"/>