修复bug和ui调整,下一步,达到特定等级才激活技能

This commit is contained in:
panw
2025-07-23 10:41:09 +08:00
parent 1611b5d3b5
commit f805bbcd4a
138 changed files with 12897 additions and 56084 deletions

View File

@@ -6,6 +6,7 @@ import { SkillSet } from "../common/config/SkillSet";
import { smc } from "../common/SingletonModuleComp";
import { oops } from "db://oops-framework/core/Oops";
import { MissionEvent } from "../common/config/MissionEvent";
import { HeroInfo } from "../common/config/heroSet";
const { ccclass, property } = _decorator;
@@ -24,6 +25,7 @@ export class EquipSkillComp extends CCComp {
onLoad() {
this.on(GameEvent.UseSkillCard, this.get_skill, this);
this.on(GameEvent.FightReady,this.fight_ready,this)
this.on(GameEvent.MasterCalled,this.master_called,this)
this.boxs=this.node.getChildByName("boxs")
this.skill1_cd_bar_progress=this.boxs.getChildByName("skill1").getChildByName("icon").getChildByName("cd").getComponent(ProgressBar)
this.skill2_cd_bar_progress=this.boxs.getChildByName("skill2").getChildByName("icon").getChildByName("cd").getComponent(ProgressBar)
@@ -32,6 +34,14 @@ export class EquipSkillComp extends CCComp {
start(){
this.fight_ready()
}
private master_called(e:any,data:any){
console.log("[EquipSkillComp]: master_called",data)
let hero=HeroInfo[data.uuid]
if(hero.skills.length>0){
this.get_skill(null,{slot:"skill1",uuid:hero.skills[1]})
this.get_skill(null,{slot:"skill2",uuid:hero.skills[2]})
}
}
skill_stone_up(e:GameEvent,data:any){
console.log("[EquipSkillComp]: skill_stone_up",data)
smc.vmdata.mission_data.skill_stone+=data