Files
pixelheros/assets/script/game/hero/HeroSpine.ts
panw 3a8f015a78 refactor: 移除调试日志并统一使用日志工具
- 删除多个文件中的 console.log/console.warn/console.error 调试输出
- 将日志输出统一替换为 mLogger 工具,支持调试模式控制
- 清理注释掉的调试代码和空方法体
2026-02-03 16:49:24 +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(){
this.anm.dead()
}
do_buff(){
this.anm.buff()
}
buff(){
this.anm.buff()
}
move(){
if(this.status=="move") return
this.status="move"
this.anm.move()
}
}