refactor(gui): 移除未使用的资源文件并调整英雄技能显示
删除未使用的图片和prefab资源文件 调整英雄控制器prefab的位置和尺寸 修改英雄信息组件显示技能信息而非魔法防御属性 更新胜利界面prefab的布局和样式
This commit is contained in:
@@ -110,37 +110,37 @@ export const HeroInfo: Record<number, heroInfo> = {
|
||||
|
||||
// 刘邦 - 领导型战士(善于用人,知人善任)
|
||||
5001:{uuid:5001,name:"刘邦",path:"hk1", fac:FacSet.HERO, kind:1,as:1.5,
|
||||
type:HType.warrior,lv:1,hp:1000,mp:85,map:10,def:9,mdef:0,ap:15,dis:100,speed:120,skills:[6002],
|
||||
type:HType.warrior,lv:1,hp:1000,mp:85,map:10,def:9,mdef:0,ap:15,dis:100,speed:120,skills:[6002,6001],
|
||||
buff:[],tal:[7101,7201,7301],info:"楚汉争霸领袖,领导统御型战士"},
|
||||
|
||||
// 荆轲 - 刺客(敏捷型,高速度和暴击率)
|
||||
5002:{uuid:5002,name:"荆轲",path:"hc1", fac:FacSet.HERO, kind:1,as:1.5,
|
||||
type:HType.assassin,lv:1,hp:80,mp:60,map:5,def:3,mdef:0,ap:22,dis:120,speed:180,skills:[6001],
|
||||
type:HType.assassin,lv:1,hp:80,mp:60,map:5,def:3,mdef:0,ap:22,dis:120,speed:180,skills:[6002,6001],
|
||||
buff:[],tal:[7201],info:"战国刺客,刺杀专精敏捷型刺客"},
|
||||
|
||||
// 赵武灵王 - 远程射手(胡服骑射,机动型高移动速度和远程攻击)
|
||||
5005:{uuid:5005,name:"赵武灵王",path:"ha1", fac:FacSet.HERO, kind:2,as:1.5,
|
||||
type:HType.remote,lv:1,hp:100,mp:80,map:8,def:6,mdef:0,ap:18,dis:450,speed:140,skills:[6001],
|
||||
type:HType.remote,lv:1,hp:100,mp:80,map:8,def:6,mdef:0,ap:18,dis:450,speed:140,skills:[6002,6001],
|
||||
buff:[],tal:[7002],info:"胡服骑射改革者,机动型高远程输出"},
|
||||
|
||||
// 张良 - 智谋法师(运筹帷幄,智谋型法师)
|
||||
5007:{uuid:5007,name:"张良",path:"hh1", fac:FacSet.HERO, kind:2,as:1.5,
|
||||
type:HType.mage,lv:1,hp:88,mp:135,map:12,def:5,mdef:0,ap:15,dis:350,speed:100,skills:[6001],
|
||||
type:HType.mage,lv:1,hp:88,mp:135,map:12,def:5,mdef:0,ap:15,dis:350,speed:100,skills:[6002,6001],
|
||||
buff:[],tal:[7004],info:"运筹帷幄谋士,智谋型法师"},
|
||||
|
||||
// 屈原 - 元素法师(离骚诗韵,元素型高魔法输出)
|
||||
5008:{uuid:5008,name:"屈原",path:"hm1", fac:FacSet.HERO, kind:2,as:1.5,
|
||||
type:HType.mage,lv:1,hp:85,mp:140,map:25,def:4,mdef:0,ap:16,dis:400,speed:90,skills:[6001],
|
||||
type:HType.mage,lv:1,hp:85,mp:140,map:25,def:4,mdef:0,ap:16,dis:400,speed:90,skills:[6002,6001],
|
||||
buff:[],tal:[7101],info:"离骚诗韵,元素型高魔法输出"},
|
||||
|
||||
// 孙膑 - 谋略法师(兵法谋略,谋略型法师)
|
||||
5009:{uuid:5009,name:"孙膑",path:"hm2", fac:FacSet.HERO, kind:2,as:1.5,
|
||||
type:HType.mage,lv:1,hp:92,mp:135,map:28,def:6,mdef:0,ap:14,dis:420,speed:95,skills:[6001],
|
||||
type:HType.mage,lv:1,hp:92,mp:135,map:28,def:6,mdef:0,ap:14,dis:420,speed:95,skills:[6002,6001],
|
||||
buff:[],tal:[7202],info:"兵法谋略,谋略型法师"},
|
||||
|
||||
// 萧何 - 后勤辅助(后勤保障,后勤型辅助)
|
||||
5010:{uuid:5010,name:"萧何",path:"hz1", fac:FacSet.HERO, kind:2,as:1.5,
|
||||
type:HType.support,lv:1,hp:115,mp:145,map:18,def:10,mdef:0,ap:8,dis:380,speed:105,skills:[6001],
|
||||
type:HType.support,lv:1,hp:115,mp:145,map:18,def:10,mdef:0,ap:8,dis:380,speed:105,skills:[6002,6001],
|
||||
buff:[],tal:[7006],info:"后勤保障,后勤型辅助"},
|
||||
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ import { smc } from '../common/SingletonModuleComp';
|
||||
import { GameEvent } from '../common/config/GameEvent';
|
||||
import { CCComp } from 'db://oops-framework/module/common/CCComp';
|
||||
import { ecs } from 'db://oops-framework/libs/ecs/ECS';
|
||||
import { SkillSet } from '../common/config/SkillSet';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('HInfoComp')
|
||||
@@ -17,8 +18,8 @@ export class HInfoComp extends CCComp {
|
||||
hp_node:any=null
|
||||
def_node:any=null
|
||||
mp_node:any=null
|
||||
map_node:any=null
|
||||
mdef_node:any=null
|
||||
skill1_node:any=null
|
||||
skill2_node:any=null
|
||||
// 重新定义节点映射,使名称更清晰
|
||||
// 当前显示的英雄节点数组(7个位置)
|
||||
heroNodes: (Node | null)[] = [null, null, null, null, null, null, null];
|
||||
@@ -67,9 +68,9 @@ export class HInfoComp extends CCComp {
|
||||
this.hp_node=this.node.getChildByName("info").getChildByName("base").getChildByName("bgs").getChildByName("hp")
|
||||
this.mp_node=this.node.getChildByName("info").getChildByName("base").getChildByName("bgs").getChildByName("mp")
|
||||
this.ap_node=this.node.getChildByName("info").getChildByName("base").getChildByName("bgs").getChildByName("ap")
|
||||
this.map_node=this.node.getChildByName("info").getChildByName("base").getChildByName("bgs").getChildByName("map")
|
||||
this.def_node=this.node.getChildByName("info").getChildByName("base").getChildByName("bgs").getChildByName("def")
|
||||
this.mdef_node=this.node.getChildByName("info").getChildByName("base").getChildByName("bgs").getChildByName("mdef")
|
||||
this.skill1_node=this.node.getChildByName("info").getChildByName("base").getChildByName("skills").getChildByName("skill1")
|
||||
this.skill2_node=this.node.getChildByName("info").getChildByName("base").getChildByName("skills").getChildByName("skill2")
|
||||
this.h_uuid=smc.fight_hero
|
||||
this.update_data(this.h_uuid)
|
||||
this.load_all_hero(this.h_uuid)
|
||||
@@ -79,20 +80,20 @@ export class HInfoComp extends CCComp {
|
||||
}
|
||||
update_data(uuid:number){
|
||||
this.h_uuid=uuid
|
||||
this.name_node.getComponent(Label).string=HeroInfo[uuid].name
|
||||
let skill1=SkillSet[HeroInfo[uuid].skills[0]]
|
||||
let skill2=SkillSet[HeroInfo[uuid].skills[1]]
|
||||
this.skill1_node.getChildByName("info").getChildByName("Label").getComponent(Label).string=skill1.info
|
||||
this.skill2_node.getChildByName("info").getChildByName("Label").getComponent(Label).string=skill2.info
|
||||
this.name_node.getComponent(Label).string=HeroInfo[uuid].name
|
||||
this.type_node.getComponent(Label).string=HTypeName[HeroInfo[uuid].type]
|
||||
this.ap_node.getChildByName("num").getComponent(Label).string=HeroInfo[uuid].ap.toString()
|
||||
this.hp_node.getChildByName("num").getComponent(Label).string=HeroInfo[uuid].hp.toString()
|
||||
this.def_node.getChildByName("num").getComponent(Label).string=HeroInfo[uuid].def.toString()
|
||||
this.mdef_node.getChildByName("num").getComponent(Label).string=HeroInfo[uuid].mdef.toString()
|
||||
this.map_node.getChildByName("num").getComponent(Label).string=HeroInfo[uuid].map.toString()
|
||||
this.mp_node.getChildByName("num").getComponent(Label).string=HeroInfo[uuid].mp.toString()
|
||||
let bar_num=getPreAttr(uuid)
|
||||
this.ap_node.getChildByName("bar").getComponent(ProgressBar).progress=bar_num.ap
|
||||
this.hp_node.getChildByName("bar").getComponent(ProgressBar).progress=bar_num.hp
|
||||
this.def_node.getChildByName("bar").getComponent(ProgressBar).progress=bar_num.def
|
||||
this.mdef_node.getChildByName("bar").getComponent(ProgressBar).progress=bar_num.mdef
|
||||
this.map_node.getChildByName("bar").getComponent(ProgressBar).progress=bar_num.map
|
||||
this.mp_node.getChildByName("bar").getComponent(ProgressBar).progress=bar_num.mp
|
||||
}
|
||||
load_all_hero(uuid:number){
|
||||
|
||||
Reference in New Issue
Block a user