Files
pixelheros/assets/script/game/hero/HeroSpine.ts
panw 38f0863583 fix(hero): 移除死亡动画播放逻辑
移除 HeroSpine、HeroViewComp 和 HeroAnmComp 中与死亡动画相关的播放调用和状态检查。因为死亡动画可能已整合到其他特效或逻辑中,继续播放会导致视觉或逻辑冲突。
2026-04-01 09:15:53 +08:00

85 lines
1.4 KiB
TypeScript

import { Color, Component, EventTouch, Vec3, _decorator ,} from "cc";
import HeroAnmComp from "./HeroAnmComp";
const { ccclass, property } = _decorator;
@ccclass('HeroSpine')
export class HeroSpine extends Component {
@property(HeroAnmComp)
anm: HeroAnmComp = null;
status:string="idle";
onLoad() {
// 角色控制组件
}
protected start(): void {
this.move();
}
/** 初始化动画 */
protected initAnimator() {
}
in_playing(){
}
change_status(value:string){
this.status=value
}
change_default(value:string){
}
default() {
}
idle(){
if(this.status=="idle") return
this.status="idle"
this.anm.idle()
}
atk() {
this.anm.atk()
}
max(){
this.anm.max()
}
play(name:string){
switch(name){
case "max":
this.max()
break
case "atk":
this.atk()
break
case "idle":
this.idle()
break
case "move":
this.move()
break
}
}
do_atked(){
this.anm.atked()
}
dead(){
}
do_buff(){
this.anm.buff()
}
buff(){
this.anm.buff()
}
move(){
if(this.status=="move") return
this.status="move"
this.anm.move()
}
}