This commit is contained in:
2024-08-26 10:14:53 +08:00
parent 4f96558d36
commit 4f64af7848
13 changed files with 176 additions and 286 deletions

View File

@@ -76,7 +76,7 @@ export class MonsterViewComp extends CCComp {
onLoad() {
this.as = this.getComponent(MonsterSpine);
// PhysicsSystem2D.instance.debugDrawFlags = EPhysics2DDrawFlags.Aabb
PhysicsSystem2D.instance.debugDrawFlags = EPhysics2DDrawFlags.Aabb
// | EPhysics2DDrawFlags.Pair
// |EPhysics2DDrawFlags.CenterOfMass
// |EPhysics2DDrawFlags.Joint
@@ -156,8 +156,8 @@ export class MonsterViewComp extends CCComp {
change_name(hero_name:string='hero',scale:number=1){
this.name=hero_name;
let label:any =this.node.getChildByName("lab_name")
label.getComponent(Label)!.string = hero_name;
// let label:any =this.node.getChildByName("lab_name")
// label.getComponent(Label)!.string = hero_name;
let collider = this.getComponent(Collider2D);
if(scale==1){
collider.group=BoxSet.HERO;
@@ -208,7 +208,7 @@ export class MonsterViewComp extends CCComp {
// console.log("monster shoot");
let skill = ecs.getEntity<Skill>(Skill);
let x=32
let pos = v3(this.scale*32,30)
let pos = v3(32,30)
let scale = this.scale
let speed =SkillSet[skill_uuid].speed;
let dis = SkillSet[skill_uuid].dis;