英雄和敌人 全死亡后,判定解决

This commit is contained in:
panfudan
2025-08-12 20:20:05 +08:00
parent b77f023548
commit d464491172
18 changed files with 1731 additions and 2685 deletions

View File

@@ -78,21 +78,7 @@ export class EquipSkillComp extends CCComp {
}
update(dt: number): void {
if(!smc.mission.play||smc.mission.pause) return
if(this.skill1.uuid!=0){
let cd=this.skill1.cd/((smc.vmdata.hero.skill_cd_buff)/100+1)
if(this.skill1.cd_time < cd){
this.skill1.cd_time+=dt
}else{
if(this.skill1.type==1){
this.do_skill1()
}
}
this.skill1_cd_bar_progress.progress=(1-this.skill1.cd_time/cd)
}
if(this.skill2.uuid!=0&&smc.vmdata.hero.power>=smc.vmdata.hero.power_max&&!this.max_show){
this.show_max()
this.max_show=true
}
}
show_max(){
@@ -116,13 +102,10 @@ export class EquipSkillComp extends CCComp {
}
do_skill2(){
if(smc.vmdata.hero.power<smc.vmdata.hero.power_max) return
console.log("do_skill2")
tween(this.boxs.getChildByName("skill2")).to(0.1, {scale:v3(1.5,1.5,1)},{onComplete:()=>{
tween(this.boxs.getChildByName("skill2")).to(0.2, {scale:v3(1,1,1)}).start()
}}).start()
this.do_skill(this.skill2.uuid)
smc.vmdata.hero.power=0
this.hide_max()
}