角色 停止后 切换到idle动画

This commit is contained in:
panfudan
2025-08-08 13:44:28 +08:00
parent 52ee731e3f
commit 25ed3a009a
8 changed files with 680 additions and 2665 deletions

View File

@@ -8,7 +8,7 @@ export class HeroSpine extends Component {
@property(HeroAnmComp)
anm: HeroAnmComp = null;
status:string="Idle";
status:string="idle";
onLoad() {
// 角色控制组件
@@ -36,9 +36,10 @@ export class HeroSpine extends Component {
}
idle(){
// console.log("change to idle",this.status);
// console.log("do Idle");
if(this.status=="Idle") return
this.status="Idle"
if(this.status=="idle") return
this.status="idle"
this.anm.idle()
}
atk() {
@@ -67,7 +68,7 @@ export class HeroSpine extends Component {
}
move(){
// console.log("doing move");
// console.log("change to move",this.status);
if(this.status=="move") return
this.status="move"
this.anm.move()