fix(hero): 修复英雄大招动画播放异常问题
1. 重构大招播放方法,支持传入自定义动画clip名,适配不同职业的大招动画 2. 修复技能匹配逻辑,通过前缀匹配处理max0/max1类型的大招技能 3. 更新技能配置表,将辅助职业的技能act改为max1适配新逻辑
This commit is contained in:
@@ -48,14 +48,16 @@ export class HeroSpine extends Component {
|
||||
atk() {
|
||||
this.anm.atk()
|
||||
}
|
||||
max(){
|
||||
this.anm.max()
|
||||
max(name: string = "max0"){
|
||||
this.anm.max(name)
|
||||
}
|
||||
play(name:string){
|
||||
// 技能表 act 配置的是 clip 名(max0/max1),不能用全等匹配 "max"
|
||||
if(name.startsWith("max")){
|
||||
this.max(name)
|
||||
return
|
||||
}
|
||||
switch(name){
|
||||
case "max":
|
||||
this.max()
|
||||
break
|
||||
case "atk":
|
||||
this.atk()
|
||||
break
|
||||
@@ -65,7 +67,7 @@ export class HeroSpine extends Component {
|
||||
case "move":
|
||||
this.move()
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
do_atked(){
|
||||
this.anm.atked()
|
||||
|
||||
Reference in New Issue
Block a user