This commit is contained in:
2024-09-02 14:43:03 +08:00
parent ede4d06d0d
commit 83bd06334f
7 changed files with 826 additions and 820 deletions

View File

@@ -27,7 +27,7 @@ export enum BoxSet {
MONSTER_START = 300,
END_POINT = 360,
//游戏地平线
GAME_LINE = 10,
GAME_LINE = 120,
CSKILL_X = 320,
CSKILL_Y = 200,
//攻击距离

View File

@@ -81,11 +81,11 @@ export class MapMonsterComp extends CCComp {
switch (x) {
case 1:
monster_layer = scene.entityLayer1!.node!;
pos.y=pos.y+200;
pos.y=pos.y+100;
break;
case 2:
monster_layer= scene.entityLayer2!.node!;
pos.y=pos.y+100;
pos.y=pos.y-100;
default:
break;
}

View File

@@ -39,7 +39,7 @@ export class MapViewComp extends CCComp {
start() {
this.scene = this.getComponent(MapViewScene);
this.load_data()
this.load_role()
// this.load_role()
}
load_role(){
let role = ecs.getEntity<Role>(Role);

View File

@@ -136,12 +136,13 @@ export class MonsterViewComp extends CCComp {
// console.log('monster view group 相同');
switch (selfCollider.group) {
case BoxSet.HERO:
if(self_pos.x < other_pos.x&&Math.abs(self_pos.x-other_pos.x) <= BoxSet.MOVE_RANGE_X && self_pos.y==other_pos.y){
if(self_pos.x < other_pos.x){
this.stop_cd=0.1
}
this.stop_cd=0.1
break;
case BoxSet.MONSTER:
if(self_pos.x > other_pos.x&&Math.abs(self_pos.x-other_pos.x) <= BoxSet.MOVE_RANGE_X && self_pos.y==other_pos.y){
if(self_pos.x > other_pos.x){
this.stop_cd=0.1
}
break