This commit is contained in:
2025-06-11 16:54:50 +08:00
parent 4096922e61
commit d06d8fe910
10 changed files with 295 additions and 141 deletions

View File

@@ -9,6 +9,7 @@ import { SkillSet, TargetGroup, TargetType } from "../common/config/SkillSet";
import { BuffComp } from "./BuffComp";
import { oops } from "db://oops-framework/core/Oops";
import { GameEvent } from "../common/config/GameEvent";
import { FightConComp } from "../map/FightConComp";
const { ccclass, property } = _decorator;
@@ -16,6 +17,7 @@ const { ccclass, property } = _decorator;
@ccclass('HeroViewComp') // 定义为 Cocos Creator 组件
@ecs.register('HeroView', false) // 定义为 ECS 组件
export class HeroViewComp extends CCComp {
FIGHTCON:FightConComp=null!
BUFFCOMP:BuffComp=null!
as: HeroSpine = null!
status:String = "idle"
@@ -84,6 +86,8 @@ export class HeroViewComp extends CCComp {
onLoad() {
this.as = this.getComponent(HeroSpine);
this.FIGHTCON=this.node.parent.getComponent(FightConComp);
console.log("hero view comp ",this.FIGHTCON)
// let anm = this.node.getChildByName("anm")
// anm.setScale(anm.scale.x*0.8,anm.scale.y*0.8);
// 注册单个碰撞体的回调函数