This commit is contained in:
pan
2024-08-16 17:06:23 +08:00
parent 5e4d16d6e7
commit e8dbb9bab3
8 changed files with 585 additions and 135 deletions

View File

@@ -76,7 +76,7 @@ export class MonsterViewComp extends CCComp {
// collider.on(Contact2DType.PRE_SOLVE, this.onPreSolve, this);
collider.on(Contact2DType.POST_SOLVE, this.onPostSolve, this);
}
this.node.getChildByName("level").getChildByName("level").getComponent(Label).string = this.level.toString();
// this.node.getChildByName("level").getChildByName("level").getComponent(Label).string = this.level.toString();
}
@@ -253,10 +253,10 @@ export class MonsterViewComp extends CCComp {
load_skill(skill_name){
// console.log("load_skill");
let skill = ecs.getEntity<Skill>(Skill);
let pos = v3(0,0)
let speed =150
let pos = v3(0,40)
let speed =110
let scale = this.camp
let range = 80
let range = 100
skill.load(pos,speed,range,scale,this.node,skill_name,this.atk);
}
in_atked() {

View File

@@ -14,7 +14,7 @@ export class SkillCom extends CCComp {
// // var entity = this.ent as ecs.Entity; // ecs.Entity 可转为当前模块的具体实体对象
// // this.on(ModuleEvent.Cmd, this.onHandler, this);
// }
speed:number = 600;
speed:number = 200;
range:number = 80;
scale:number = 1;
atk:number = 10;