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

File diff suppressed because it is too large Load Diff

View File

@@ -50,8 +50,8 @@
"height": 250, "height": 250,
"rawWidth": 1775, "rawWidth": 1775,
"rawHeight": 250, "rawHeight": 250,
"borderTop": 0, "borderTop": 52,
"borderBottom": 0, "borderBottom": 172,
"borderLeft": 0, "borderLeft": 0,
"borderRight": 0, "borderRight": 0,
"packable": true, "packable": true,

View File

@@ -439,7 +439,7 @@
"__id__": 9 "__id__": 9
}, },
"_children": [], "_children": [],
"_active": true, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 11 "__id__": 11
@@ -649,7 +649,7 @@
"__id__": 9 "__id__": 9
}, },
"_children": [], "_children": [],
"_active": false, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 21 "__id__": 21
@@ -664,7 +664,7 @@
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0, "x": 0,
"y": 386.128, "y": 472.233,
"z": 0 "z": 0
}, },
"_lrot": { "_lrot": {
@@ -676,8 +676,8 @@
}, },
"_lscale": { "_lscale": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 1.5, "x": 1,
"y": 1.5, "y": 1,
"z": 1 "z": 1
}, },
"_mobility": 0, "_mobility": 0,
@@ -785,7 +785,7 @@
"__id__": 9 "__id__": 9
}, },
"_children": [], "_children": [],
"_active": false, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 27 "__id__": 27
@@ -800,7 +800,7 @@
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 237.308, "x": 237.308,
"y": 403.375, "y": 489.48,
"z": 0 "z": 0
}, },
"_lrot": { "_lrot": {
@@ -813,7 +813,7 @@
"_lscale": { "_lscale": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 1, "x": 1,
"y": 1.5, "y": 1,
"z": 1 "z": 1
}, },
"_mobility": 0, "_mobility": 0,
@@ -921,7 +921,7 @@
"__id__": 9 "__id__": 9
}, },
"_children": [], "_children": [],
"_active": false, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 33 "__id__": 33
@@ -936,7 +936,7 @@
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 189.041, "x": 189.041,
"y": 454.505, "y": 540.61,
"z": 0 "z": 0
}, },
"_lrot": { "_lrot": {
@@ -949,7 +949,7 @@
"_lscale": { "_lscale": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 1, "x": 1,
"y": 2, "y": 1,
"z": 1 "z": 1
}, },
"_mobility": 0, "_mobility": 0,
@@ -1057,7 +1057,7 @@
"__id__": 9 "__id__": 9
}, },
"_children": [], "_children": [],
"_active": false, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 39 "__id__": 39
@@ -1072,7 +1072,7 @@
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0, "x": 0,
"y": 0, "y": 86.105,
"z": 0 "z": 0
}, },
"_lrot": { "_lrot": {
@@ -1113,7 +1113,7 @@
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 1773, "width": 1773,
"height": 250 "height": 450
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
@@ -1152,9 +1152,9 @@
"__uuid__": "62c9a567-cc88-4a66-a76f-183cc1e61b55@f9941", "__uuid__": "62c9a567-cc88-4a66-a76f-183cc1e61b55@f9941",
"__expectedType__": "cc.SpriteFrame" "__expectedType__": "cc.SpriteFrame"
}, },
"_type": 0, "_type": 1,
"_fillType": 0, "_fillType": 0,
"_sizeMode": 1, "_sizeMode": 0,
"_fillCenter": { "_fillCenter": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": 0, "x": 0,
@@ -1180,6 +1180,8 @@
"__id__": 0 "__id__": 0
}, },
"fileId": "252Y+fH3NOL7xVrv2RoEs5", "fileId": "252Y+fH3NOL7xVrv2RoEs5",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null "nestedPrefabInstanceRoots": null
}, },
{ {
@@ -1264,6 +1266,8 @@
"__id__": 0 "__id__": 0
}, },
"fileId": "6dFdGsgPxD8oVoba7hVEO3", "fileId": "6dFdGsgPxD8oVoba7hVEO3",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null "nestedPrefabInstanceRoots": null
}, },
{ {
@@ -1933,6 +1937,8 @@
"__id__": 0 "__id__": 0
}, },
"fileId": "68Q5vEQWBINrggngtTZ7wh", "fileId": "68Q5vEQWBINrggngtTZ7wh",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null "nestedPrefabInstanceRoots": null
}, },
{ {

View File

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

View File

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

View File

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

View File

@@ -136,12 +136,13 @@ export class MonsterViewComp extends CCComp {
// console.log('monster view group 相同'); // console.log('monster view group 相同');
switch (selfCollider.group) { switch (selfCollider.group) {
case BoxSet.HERO: 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
} }
this.stop_cd=0.1
break; break;
case BoxSet.MONSTER: 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 this.stop_cd=0.1
} }
break break