角色 停止后 切换到idle动画
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user