4 Commits

Author SHA1 Message Date
panw
2443dfce85 refactor(map): 为所有组件的onDestroy添加父类调用
统一修复组件销毁时未调用父类生命周期方法的问题,确保资源正确释放
2026-05-13 16:03:53 +08:00
panw
7cb07c04dd fix(config): 调整两个辅助英雄的基础ap属性
将5301和5302英雄的ap分别从20/40调整为50/50,统一辅助英雄输出属性
2026-05-13 16:03:39 +08:00
panw
d6f020dc96 fix: 调整所有一级英雄的基础生命值属性
统一优化法师、远程、辅助类英雄的初始血量,平衡前期作战能力
2026-05-13 16:01:06 +08:00
panw
2b446ad45c fix: 修复多个预制体布局与组件问题
1. 调整ranks.prefab的prefab引用与新增输入阻断组件
2. 统一调整hnode.prefab的节点位置、尺寸与字体样式
3. 修复map_rpg.prefab的节点偏移、组件id与新增背景矩形节点
2026-05-13 15:38:48 +08:00
18 changed files with 4463 additions and 3342 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -110,7 +110,7 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 45,
"x": 0,
"y": 0,
"z": 0
},
@@ -151,8 +151,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 160,
"height": 160
"width": 200,
"height": 200
},
"_anchorPoint": {
"__type__": "cc.Vec2",
@@ -294,8 +294,8 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 45,
"y": 17.631,
"x": 0,
"y": 11.301,
"z": 0
},
"_lrot": {
@@ -307,8 +307,8 @@
},
"_lscale": {
"__type__": "cc.Vec3",
"x": -0.8,
"y": 0.8,
"x": -1,
"y": 1,
"z": 1
},
"_mobility": 0,
@@ -509,7 +509,7 @@
"_top": 0,
"_bottom": 0,
"_horizontalCenter": 0,
"_verticalCenter": 17.631,
"_verticalCenter": 11.301,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
@@ -572,7 +572,7 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 103.653,
"x": 72.111,
"y": 0,
"z": 0
},
@@ -772,8 +772,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 60,
"height": 170
"width": 80,
"height": 210
},
"_anchorPoint": {
"__type__": "cc.Vec2",
@@ -991,8 +991,8 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 45,
"y": -8.595,
"x": 0,
"y": -12.461,
"z": 0
},
"_lrot": {
@@ -1085,8 +1085,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 90,
"height": 20
"width": 105,
"height": 25
},
"_anchorPoint": {
"__type__": "cc.Vec2",
@@ -1163,8 +1163,8 @@
"_target": null,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_top": -2.5,
"_bottom": -2.5,
"_horizontalCenter": 0,
"_verticalCenter": 0,
"_isAbsLeft": true,
@@ -1435,8 +1435,8 @@
"_string": "99999",
"_horizontalAlign": 1,
"_verticalAlign": 1,
"_actualFontSize": 18,
"_fontSize": 18,
"_actualFontSize": 20,
"_fontSize": 20,
"_fontFamily": "Arial",
"_lineHeight": 20,
"_overflow": 2,
@@ -1505,7 +1505,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 90,
"width": 105,
"height": 20
},
"_anchorPoint": {
@@ -1649,8 +1649,8 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 45,
"y": -26.278,
"x": 0,
"y": -35.14,
"z": 0
},
"_lrot": {
@@ -1743,8 +1743,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 90,
"height": 20
"width": 105,
"height": 25
},
"_anchorPoint": {
"__type__": "cc.Vec2",
@@ -1821,8 +1821,8 @@
"_target": null,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_top": -2.5,
"_bottom": -2.5,
"_horizontalCenter": 0,
"_verticalCenter": 0,
"_isAbsLeft": true,
@@ -2093,8 +2093,8 @@
"_string": "99999",
"_horizontalAlign": 1,
"_verticalAlign": 1,
"_actualFontSize": 18,
"_fontSize": 18,
"_actualFontSize": 20,
"_fontSize": 20,
"_fontFamily": "Arial",
"_lineHeight": 20,
"_overflow": 2,
@@ -2163,7 +2163,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 90,
"width": 105,
"height": 20
},
"_anchorPoint": {
@@ -2310,7 +2310,7 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 45,
"x": 0,
"y": 0,
"z": 0
},
@@ -2582,8 +2582,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 180,
"height": 180
"width": 220,
"height": 220
},
"_anchorPoint": {
"__type__": "cc.Vec2",
@@ -3241,8 +3241,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 90,
"height": 90
"width": 110,
"height": 110
},
"_anchorPoint": {
"__type__": "cc.Vec2",
@@ -5242,8 +5242,8 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 45,
"y": 40.66599999999994,
"x": 0,
"y": 46.513,
"z": 0
},
"_lrot": {
@@ -5392,12 +5392,12 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 90,
"height": 90
"width": 110,
"height": 110
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0,
"x": 0.5,
"y": 0.5
},
"_id": ""

File diff suppressed because it is too large Load Diff

View File

@@ -47,10 +47,13 @@
},
{
"__id__": 187
},
{
"__id__": 189
}
],
"_prefab": {
"__id__": 189
"__id__": 191
},
"_lpos": {
"__type__": "cc.Vec3",
@@ -3832,6 +3835,8 @@
"__id__": 0
},
"fileId": "60zyAJG75FD4lr3BUqk8h+",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
@@ -3966,6 +3971,8 @@
"__id__": 0
},
"fileId": "5baCaOgaJJj5xGYYZRPLag",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
@@ -4320,6 +4327,24 @@
"__type__": "cc.CompPrefabInfo",
"fileId": "a8f3R/dcVJa4WiCkhL/wGK"
},
{
"__type__": "cc.BlockInputEvents",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 1
},
"_enabled": true,
"__prefab": {
"__id__": 190
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "06K0yfnYlMPJjdjg9cQ8Rg"
},
{
"__type__": "cc.PrefabInfo",
"root": {
@@ -4330,6 +4355,7 @@
},
"fileId": "84hrfbDo1AOq3VROGZvWWt",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": [
{
"__id__": 151

View File

@@ -158,34 +158,34 @@ export const HeroInfo: Record<number, heroInfo> = {
// ========== 法师英雄 ==========
5101:{uuid:5101,name:t("hero_name_5101"),path:"hm2", fac:FacSet.HERO,cards_lv:1,lv:1,type:HType.Long,hp:50,ap:60,speed:800,revive:{s_uuid:6501,r_num:1,upr:0.5},
5101:{uuid:5101,name:t("hero_name_5101"),path:"hm2", fac:FacSet.HERO,cards_lv:1,lv:1,type:HType.Long,hp:150,ap:60,speed:800,revive:{s_uuid:6501,r_num:1,upr:0.5},
skills:{6201:{uuid:6007,lv:1,cd:1,ccd:0}},info:t("hero_info_5101")},
5102:{uuid:5102,name:t("hero_name_5102"),path:"hm1", fac:FacSet.HERO,cards_lv:2,lv:1,type:HType.Long,hp:30,ap:120,speed:800,
5102:{uuid:5102,name:t("hero_name_5102"),path:"hm1", fac:FacSet.HERO,cards_lv:2,lv:1,type:HType.Long,hp:130,ap:120,speed:800,
skills:{6203:{uuid:6002,lv:1,cd:1,ccd:0}},info:t("hero_info_5102")},
5103:{uuid:5103,name:t("hero_name_5103"),path:"hm9", fac:FacSet.HERO,cards_lv:3,lv:1,type:HType.Long,hp:45,ap:180,speed:800,
5103:{uuid:5103,name:t("hero_name_5103"),path:"hm9", fac:FacSet.HERO,cards_lv:3,lv:1,type:HType.Long,hp:145,ap:180,speed:800,
skills:{6201:{uuid:6002,lv:1,cd:1,ccd:0}},info:t("hero_info_5103")},
5104:{uuid:5104,name:t("hero_name_5104"),path:"hm4", fac:FacSet.HERO,cards_lv:4,lv:1,type:HType.Long,hp:60,ap:240,speed:800,
5104:{uuid:5104,name:t("hero_name_5104"),path:"hm4", fac:FacSet.HERO,cards_lv:4,lv:1,type:HType.Long,hp:160,ap:240,speed:800,
skills:{6201:{uuid:66002201,lv:1,cd:1,ccd:0}},info:t("hero_info_5104")},
5105:{uuid:5105,name:t("hero_name_5105"),path:"hm3", fac:FacSet.HERO,cards_lv:5,lv:1,type:HType.Long,hp:75,ap:300,speed:800,
5105:{uuid:5105,name:t("hero_name_5105"),path:"hm3", fac:FacSet.HERO,cards_lv:5,lv:1,type:HType.Long,hp:175,ap:300,speed:800,
skills:{6203:{uuid:6002,lv:1,cd:1,ccd:0}},info:t("hero_info_5105") },
// ========== 远程英雄 ==========
5201:{uuid:5201,name:t("hero_name_5201"),path:"ha1", fac:FacSet.HERO,cards_lv:1,lv:1,type:HType.Long,hp:15,ap:60,speed:800,
5201:{uuid:5201,name:t("hero_name_5201"),path:"ha1", fac:FacSet.HERO,cards_lv:1,lv:1,type:HType.Long,hp:115,ap:60,speed:800,
skills:{6101:{uuid:6005,lv:1,cd:0.9,ccd:0}},info:t("hero_info_5201")},
5202:{uuid:5202,name:t("hero_name_5202"),path:"ha2", fac:FacSet.HERO,cards_lv:3,lv:1,type:HType.Long,hp:45,ap:180,speed:800,
5202:{uuid:5202,name:t("hero_name_5202"),path:"ha2", fac:FacSet.HERO,cards_lv:3,lv:1,type:HType.Long,hp:145,ap:180,speed:800,
skills:{6011:{uuid:6005,lv:1,cd:0.9,ccd:0}},info:t("hero_info_5202")},
5203:{uuid:5203,name:t("hero_name_5203"),path:"ha3", fac:FacSet.HERO,cards_lv:3,lv:1,type:HType.Long,hp:45,ap:180,speed:800,
5203:{uuid:5203,name:t("hero_name_5203"),path:"ha3", fac:FacSet.HERO,cards_lv:3,lv:1,type:HType.Long,hp:145,ap:180,speed:800,
skills:{6011:{uuid:6005,lv:1,cd:0.9,ccd:0}},info:t("hero_info_5203")},
// ========== 辅助英雄 ==========
5301:{uuid:5301,name:t("hero_name_5301"),path:"hh1", fac:FacSet.HERO,cards_lv:1,lv:1,type:HType.Long,hp:15,ap:20,speed:800,atking:[{s_uuid:6302,t_num:2}],
5301:{uuid:5301,name:t("hero_name_5301"),path:"hh1", fac:FacSet.HERO,cards_lv:1,lv:1,type:HType.Long,hp:115,ap:50,speed:800,atking:[{s_uuid:6302,t_num:2}],
skills:{6202:{uuid:6004,lv:1,cd:1.2,ccd:0}},info:t("hero_info_5301") },
5302:{uuid:5302,name:t("hero_name_5302"),path:"hz1", fac:FacSet.HERO,cards_lv:2,lv:1,type:HType.Long,hp:30,ap:40,speed:800,atking:[{s_uuid:6304,t_num:2}],
5302:{uuid:5302,name:t("hero_name_5302"),path:"hz1", fac:FacSet.HERO,cards_lv:2,lv:1,type:HType.Long,hp:130,ap:50,speed:800,atking:[{s_uuid:6304,t_num:2}],
skills:{6202:{uuid:6004,lv:1,cd:1.2,ccd:0}},info:t("hero_info_5302")},
5303:{uuid:5303,name:t("hero_name_5303"),path:"hm6", fac:FacSet.HERO,cards_lv:4,lv:1,type:HType.Long,hp:60,ap:80,speed:800,
5303:{uuid:5303,name:t("hero_name_5303"),path:"hm6", fac:FacSet.HERO,cards_lv:4,lv:1,type:HType.Long,hp:160,ap:80,speed:800,
skills:{6202:{uuid:6004,lv:1,cd:1.2,ccd:0}},info:t("hero_info_5303")},
5304:{uuid:5304,name:t("hero_name_5304"),path:"hm7", fac:FacSet.HERO,cards_lv:6,lv:1,type:HType.Long,hp:90,ap:120,speed:800,
5304:{uuid:5304,name:t("hero_name_5304"),path:"hm7", fac:FacSet.HERO,cards_lv:6,lv:1,type:HType.Long,hp:190,ap:120,speed:800,
skills:{6202:{uuid:6004,lv:1,cd:1.2,ccd:0}},info:t("hero_info_5304")},

View File

@@ -157,6 +157,7 @@ export class CardComp extends CCComp {
/** 组件销毁时解绑所有事件,防止残留回调 */
onDestroy() {
super.onDestroy();
this.unbindEvents();
}

View File

@@ -80,6 +80,7 @@ export class HInfoComp extends CCComp {
}
onDestroy() {
super.onDestroy();
}
/**

View File

@@ -79,6 +79,7 @@ export class IBoxComp extends CCComp {
/** 解绑点击事件 */
onDestroy() {
super.onDestroy();
if (this.node && this.node.isValid) {
this.node.off(NodeEventType.TOUCH_END, this.onTapClose, this);
}

View File

@@ -84,6 +84,7 @@ export class MissSkillsComp extends CCComp {
/** 移除事件监听 */
onDestroy() {
super.onDestroy();
oops.message.off(GameEvent.UseSkillCard, this.onUseSkillCard, this);
oops.message.off(GameEvent.RemoveSkillBox, this.onRemoveSkillBox, this);
}

View File

@@ -174,6 +174,7 @@ export class MissionCardComp extends CCComp {
/** 组件销毁时解绑所有事件并清理英雄信息面板 */
onDestroy() {
super.onDestroy();
if (this.cards_chou && this.cards_chou.isValid) {
this.cards_chou.off(NodeEventType.TOUCH_START, this.onDrawTouchStart, this);
this.cards_chou.off(NodeEventType.TOUCH_END, this.onDrawTouchEnd, this);

View File

@@ -201,6 +201,7 @@ export class MissionComp extends CCComp {
}
onDestroy(){
super.onDestroy();
if (this.start_btn && this.start_btn.isValid) {
this.start_btn.off(NodeEventType.TOUCH_END, this.onStartFightBtnClick, this);
}

View File

@@ -101,6 +101,7 @@ export class MissionHeroCompComp extends CCComp {
}
onDestroy(){
super.onDestroy();
// 清理全部监听
oops.message.off(GameEvent.CallHero,this.call_hero,this)
oops.message.off("PhasePrepareStart",this.fight_ready,this)

View File

@@ -66,7 +66,7 @@ export class RanksComp extends CCComp {
}
onDestroy() {
super.onDestroy();
}
/** 关闭排行榜弹窗 */

View File

@@ -92,6 +92,7 @@ export class SkillBoxComp extends CCComp {
/** 销毁时移除所有事件监听并通知槽位管理器回收 */
onDestroy() {
super.onDestroy();
oops.message.off(GameEvent.FightStart, this.onFightStart, this);
oops.message.off(GameEvent.MissionEnd, this.onMissionEnd, this);
if (this.node && this.node.isValid) {

View File

@@ -113,6 +113,7 @@ export class TalentItemComp extends CCComp {
}
protected onDestroy(): void {
super.onDestroy();
if (this.btn_upgrade && this.btn_upgrade.node && this.btn_upgrade.node.isValid) {
this.btn_upgrade.node.off(Button.EventType.CLICK, this.onUpgradeClicked, this);
}

View File

@@ -254,6 +254,7 @@ export class TalentsComp extends CCComp {
}
protected onDestroy(): void {
super.onDestroy();
mLogger.log(this.debugMode, 'TalentsComp', "释放界面");
if (this.btn_reset && this.btn_reset.node && this.btn_reset.node.isValid) {
this.btn_reset.node.off(Button.EventType.CLICK, this.onResetClicked, this);

View File

@@ -598,6 +598,7 @@ export class VictoryComp extends CCComp {
}
protected onDestroy(): void {
super.onDestroy();
mLogger.log(this.debugMode, 'VictoryComp', "释放胜利界面");
}