重构了 技能系统,还需要完善
This commit is contained in:
@@ -26,17 +26,17 @@ export interface BuffInfo {
|
||||
@ecs.register('HeroView', false) // 定义ECS 组件
|
||||
export class HeroViewComp extends CCComp {
|
||||
// ==================== View 层属性(表现相关)====================
|
||||
EBus:any=null!
|
||||
as: HeroSpine = null!
|
||||
status:String = "idle"
|
||||
scale: number = 1; // 显示方向
|
||||
box_group:number = BoxSet.HERO; // 碰撞组
|
||||
is_atking:boolean = false; // 是否正在攻击
|
||||
|
||||
// ==================== UI 节点引用 ====================
|
||||
private top_node: Node = null!;
|
||||
|
||||
// ==================== 直接访问 HeroAttrsComp ====================
|
||||
private get model() {
|
||||
get model() {
|
||||
return this.ent.get(HeroAttrsComp);
|
||||
}
|
||||
|
||||
@@ -50,7 +50,6 @@ export class HeroViewComp extends CCComp {
|
||||
private damageInterval: number = 0.01; // 伤害数字显示间隔
|
||||
onLoad() {
|
||||
this.as = this.getComponent(HeroSpine);
|
||||
this.EBus=this.ent.get(EBusComp);
|
||||
//console.log("[HeroViewComp]:hero view comp ",this.FIGHTCON)
|
||||
this.on(GameEvent.FightEnd,this.do_fight_end,this)
|
||||
const collider = this.node.getComponent(BoxCollider2D);
|
||||
|
||||
Reference in New Issue
Block a user