mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-06-26 03:14:47 +00:00
28 lines
674 B
TypeScript
28 lines
674 B
TypeScript
import { _decorator, sp } from "cc";
|
|
import { JNGSyncProtoBase } from "../../../App";
|
|
import GObject from "../GObject";
|
|
import { BehaviorStatus } from "../../../../../extensions/Behavior Creator/runtime/main";
|
|
const { ccclass, property } = _decorator;
|
|
|
|
//角色基类
|
|
export default abstract class GRoleBase<T> extends GObject<T>{
|
|
|
|
@property(sp.Skeleton)
|
|
spine:sp.Skeleton;
|
|
|
|
onLoad(){
|
|
super.onLoad();
|
|
if(!this.spine) this.spine = this.node.getComponent(sp.Skeleton);
|
|
|
|
//如果没有生成则直接销毁
|
|
this.node.removeFromParent();
|
|
}
|
|
|
|
//攻击
|
|
public onAttack(data){
|
|
return BehaviorStatus.Success;
|
|
}
|
|
|
|
}
|
|
|