fix(hero): 修复英雄死亡状态处理和怪物生成逻辑

调整HeroAnmComp中动画完成时的状态检查,增加dead和stun状态
修改MissionMonComp中怪物生成逻辑,现在只生成第一个怪物
重构HeroViewComp的死亡处理逻辑,添加死亡计时器和复活功能
This commit is contained in:
2025-11-03 16:07:13 +08:00
parent 1a45e91f1a
commit c98f20ba1d
3 changed files with 44 additions and 28 deletions

View File

@@ -21,7 +21,7 @@ export default class HeroAnmComp extends Component{
}
onAnimationFinished(type:Animation.EventType, state:AnimationState){
// console.log("[HeroAnmComp]: 动画播放完毕",state.name)
if(state.name!="idle"&&state.name!="move"){
if(state.name!="idle"&&state.name!="move"&&state.name!="dead"&&state.name!="stun"){
this.anmcon.play(this.default_anim)
}
}