diff --git a/assets/resources/tileMap/Bg2.jpg b/assets/resources/tileMap/Bg2.jpg
new file mode 100644
index 0000000..6a62835
Binary files /dev/null and b/assets/resources/tileMap/Bg2.jpg differ
diff --git a/assets/resources/tileMap/Bg2.jpg.meta b/assets/resources/tileMap/Bg2.jpg.meta
new file mode 100644
index 0000000..13d3c01
--- /dev/null
+++ b/assets/resources/tileMap/Bg2.jpg.meta
@@ -0,0 +1,134 @@
+{
+ "ver": "1.0.27",
+ "importer": "image",
+ "imported": true,
+ "uuid": "7928be26-3b89-4520-8008-7fe4b4ae5f70",
+ "files": [
+ ".jpg",
+ ".json"
+ ],
+ "subMetas": {
+ "6c48a": {
+ "importer": "texture",
+ "uuid": "7928be26-3b89-4520-8008-7fe4b4ae5f70@6c48a",
+ "displayName": "Bg2",
+ "id": "6c48a",
+ "name": "texture",
+ "userData": {
+ "wrapModeS": "clamp-to-edge",
+ "wrapModeT": "clamp-to-edge",
+ "imageUuidOrDatabaseUri": "7928be26-3b89-4520-8008-7fe4b4ae5f70",
+ "isUuid": true,
+ "visible": false,
+ "minfilter": "linear",
+ "magfilter": "linear",
+ "mipfilter": "none",
+ "anisotropy": 0
+ },
+ "ver": "1.0.22",
+ "imported": true,
+ "files": [
+ ".json"
+ ],
+ "subMetas": {}
+ },
+ "f9941": {
+ "importer": "sprite-frame",
+ "uuid": "7928be26-3b89-4520-8008-7fe4b4ae5f70@f9941",
+ "displayName": "Bg2",
+ "id": "f9941",
+ "name": "spriteFrame",
+ "userData": {
+ "trimThreshold": 1,
+ "rotated": false,
+ "offsetX": 0,
+ "offsetY": 0,
+ "trimX": 0,
+ "trimY": 0,
+ "width": 1080,
+ "height": 1920,
+ "rawWidth": 1080,
+ "rawHeight": 1920,
+ "borderTop": 0,
+ "borderBottom": 0,
+ "borderLeft": 0,
+ "borderRight": 0,
+ "packable": true,
+ "pixelsToUnit": 100,
+ "pivotX": 0.5,
+ "pivotY": 0.5,
+ "meshType": 0,
+ "vertices": {
+ "rawPosition": [
+ -540,
+ -960,
+ 0,
+ 540,
+ -960,
+ 0,
+ -540,
+ 960,
+ 0,
+ 540,
+ 960,
+ 0
+ ],
+ "indexes": [
+ 0,
+ 1,
+ 2,
+ 2,
+ 1,
+ 3
+ ],
+ "uv": [
+ 0,
+ 1920,
+ 1080,
+ 1920,
+ 0,
+ 0,
+ 1080,
+ 0
+ ],
+ "nuv": [
+ 0,
+ 0,
+ 1,
+ 0,
+ 0,
+ 1,
+ 1,
+ 1
+ ],
+ "minPos": [
+ -540,
+ -960,
+ 0
+ ],
+ "maxPos": [
+ 540,
+ 960,
+ 0
+ ]
+ },
+ "isUuid": true,
+ "imageUuidOrDatabaseUri": "7928be26-3b89-4520-8008-7fe4b4ae5f70@6c48a",
+ "atlasUuid": "",
+ "trimType": "auto"
+ },
+ "ver": "1.0.12",
+ "imported": true,
+ "files": [
+ ".json"
+ ],
+ "subMetas": {}
+ }
+ },
+ "userData": {
+ "type": "sprite-frame",
+ "hasAlpha": false,
+ "fixAlphaTransparencyArtifacts": false,
+ "redirect": "7928be26-3b89-4520-8008-7fe4b4ae5f70@6c48a"
+ }
+}
diff --git a/assets/resources/tileMap/map2.tmx b/assets/resources/tileMap/map2.tmx
new file mode 100644
index 0000000..55e96d7
--- /dev/null
+++ b/assets/resources/tileMap/map2.tmx
@@ -0,0 +1,71 @@
+
+
diff --git a/assets/resources/tileMap/map2.tmx.meta b/assets/resources/tileMap/map2.tmx.meta
new file mode 100644
index 0000000..43abe78
--- /dev/null
+++ b/assets/resources/tileMap/map2.tmx.meta
@@ -0,0 +1,12 @@
+{
+ "ver": "1.0.2",
+ "importer": "tiled-map",
+ "imported": true,
+ "uuid": "f9ab4f41-457d-4455-97b2-3857764f39e1",
+ "files": [
+ ".json",
+ ".tmx"
+ ],
+ "subMetas": {},
+ "userData": {}
+}
diff --git a/assets/resources/tileMap/set-2.tsx b/assets/resources/tileMap/set-2.tsx
new file mode 100644
index 0000000..ba1f48b
--- /dev/null
+++ b/assets/resources/tileMap/set-2.tsx
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/assets/resources/tileMap/set-2.tsx.meta b/assets/resources/tileMap/set-2.tsx.meta
new file mode 100644
index 0000000..ce3af16
--- /dev/null
+++ b/assets/resources/tileMap/set-2.tsx.meta
@@ -0,0 +1,11 @@
+{
+ "ver": "1.0.1",
+ "importer": "text",
+ "imported": true,
+ "uuid": "a03b5d7f-d513-4a52-a491-547e55806394",
+ "files": [
+ ".json"
+ ],
+ "subMetas": {},
+ "userData": {}
+}
diff --git a/assets/scenes/main.scene b/assets/scenes/main.scene
index 2cf5fcd..ac278bb 100644
--- a/assets/scenes/main.scene
+++ b/assets/scenes/main.scene
@@ -52,7 +52,7 @@
},
"autoReleaseAssets": false,
"_globals": {
- "__id__": 43
+ "__id__": 53
},
"_id": "58132e64-0171-4c7f-89be-a2984ca7de6b"
},
@@ -75,10 +75,13 @@
"__id__": 25
},
{
- "__id__": 28
+ "__id__": 35
},
{
- "__id__": 31
+ "__id__": 38
+ },
+ {
+ "__id__": 41
},
{
"__id__": 6
@@ -87,13 +90,13 @@
"_active": true,
"_components": [
{
- "__id__": 40
+ "__id__": 50
},
{
- "__id__": 41
+ "__id__": 51
},
{
- "__id__": 42
+ "__id__": 52
}
],
"_prefab": null,
@@ -242,7 +245,7 @@
},
"smoothness": 0.1,
"mapWidth": 1080,
- "mapHeight": 2560,
+ "mapHeight": 1920,
"_id": "f3ED2JS1JKurfMG53fWzmg"
},
{
@@ -279,8 +282,8 @@
"_prefab": null,
"_lpos": {
"__type__": "cc.Vec3",
- "x": 123.77,
- "y": -26.144,
+ "x": -122.544,
+ "y": -705.63,
"z": 0
},
"_lrot": {
@@ -596,7 +599,7 @@
},
{
"__type__": "cc.Node",
- "_name": "TiledMap",
+ "_name": "map2",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
@@ -650,7 +653,7 @@
"y": 0,
"z": 0
},
- "_id": "05FcfqWLRCTLU2Pon+/5lM"
+ "_id": "b9ayD7saFKwb2aQjnMUnmO"
},
{
"__type__": "cc.Node",
@@ -673,7 +676,7 @@
"_prefab": null,
"_lpos": {
"__type__": "cc.Vec3",
- "x": 0,
+ "x": -4,
"y": 0,
"z": 0
},
@@ -698,7 +701,7 @@
"y": 0,
"z": 0
},
- "_id": "dcjO1Ab2tDIbg6VVr9YHdO"
+ "_id": "dahH/uFblLQLr8f8pZIR15"
},
{
"__type__": "cc.UITransform",
@@ -713,14 +716,14 @@
"_contentSize": {
"__type__": "cc.Size",
"width": 1080,
- "height": 2560
+ "height": 1920
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
- "_id": "8aW0b4lGxCVbal8zQBKbyB"
+ "_id": "29xmInz2hLT5lky1YDgWWU"
},
{
"__type__": "cc.Sprite",
@@ -743,12 +746,12 @@
"a": 255
},
"_spriteFrame": {
- "__uuid__": "361c5873-d797-420e-be65-81c5a8f91215@f9941",
+ "__uuid__": "7928be26-3b89-4520-8008-7fe4b4ae5f70@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 0,
"_fillType": 0,
- "_sizeMode": 0,
+ "_sizeMode": 1,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
@@ -759,7 +762,7 @@
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": null,
- "_id": "37daNZffxGSq/F3WV+F0Y5"
+ "_id": "det0LOmkBDKa6S0jgkYJH5"
},
{
"__type__": "cc.Node",
@@ -807,7 +810,7 @@
"y": 0,
"z": 0
},
- "_id": "23cuMKDVtPs71LOAe7QMgZ"
+ "_id": "29cHaG7R5FfZ91Er9ijJW+"
},
{
"__type__": "cc.UITransform",
@@ -821,15 +824,15 @@
"__prefab": null,
"_contentSize": {
"__type__": "cc.Size",
- "width": 1056,
- "height": 2560
+ "width": 1088,
+ "height": 1920
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
- "_id": "e8IRovTjZNga4GC6wNHoIP"
+ "_id": "d0dVoYJ15HOKlm/RtUI1uv"
},
{
"__type__": "cc.TiledLayer",
@@ -851,7 +854,7 @@
"b": 255,
"a": 0
},
- "_id": "30V2VyJEZCsKfZxqWiSZMJ"
+ "_id": "361XTWgwhDWqDH6H8zA8AW"
},
{
"__type__": "cc.UITransform",
@@ -863,6 +866,322 @@
},
"_enabled": true,
"__prefab": null,
+ "_contentSize": {
+ "__type__": "cc.Size",
+ "width": 1088,
+ "height": 1920
+ },
+ "_anchorPoint": {
+ "__type__": "cc.Vec2",
+ "x": 0.5,
+ "y": 0.5
+ },
+ "_id": "fcEQeum0tMU4QUmFR1+cGK"
+ },
+ {
+ "__type__": "cc.TiledMap",
+ "_name": "",
+ "_objFlags": 0,
+ "__editorExtras__": {},
+ "node": {
+ "__id__": 15
+ },
+ "_enabled": true,
+ "__prefab": null,
+ "_tmxFile": {
+ "__uuid__": "f9ab4f41-457d-4455-97b2-3857764f39e1",
+ "__expectedType__": "cc.TiledMapAsset"
+ },
+ "_enableCulling": true,
+ "cleanupImageCache": true,
+ "_id": "10RXPOoMhEObEsuzNWWlw1"
+ },
+ {
+ "__type__": "9f9f8e8d-3b4c-5d6e-9f0e-2b3c4d5e6f7g",
+ "_name": "",
+ "_objFlags": 0,
+ "__editorExtras__": {},
+ "node": {
+ "__id__": 15
+ },
+ "_enabled": true,
+ "__prefab": null,
+ "tiledMap": {
+ "__id__": 23
+ },
+ "walkableLayerName": "WalkableLayer",
+ "tileSize": 32,
+ "_id": "1dgMYdcURInZC/UJAogJZH"
+ },
+ {
+ "__type__": "cc.Node",
+ "_name": "TiledMap",
+ "_objFlags": 0,
+ "__editorExtras__": {},
+ "_parent": {
+ "__id__": 2
+ },
+ "_children": [
+ {
+ "__id__": 26
+ },
+ {
+ "__id__": 29
+ }
+ ],
+ "_active": false,
+ "_components": [
+ {
+ "__id__": 32
+ },
+ {
+ "__id__": 33
+ },
+ {
+ "__id__": 34
+ }
+ ],
+ "_prefab": null,
+ "_lpos": {
+ "__type__": "cc.Vec3",
+ "x": 0,
+ "y": 0,
+ "z": 0
+ },
+ "_lrot": {
+ "__type__": "cc.Quat",
+ "x": 0,
+ "y": 0,
+ "z": 0,
+ "w": 1
+ },
+ "_lscale": {
+ "__type__": "cc.Vec3",
+ "x": 1,
+ "y": 1,
+ "z": 1
+ },
+ "_mobility": 0,
+ "_layer": 33554432,
+ "_euler": {
+ "__type__": "cc.Vec3",
+ "x": 0,
+ "y": 0,
+ "z": 0
+ },
+ "_id": "05FcfqWLRCTLU2Pon+/5lM"
+ },
+ {
+ "__type__": "cc.Node",
+ "_name": "bg",
+ "_objFlags": 0,
+ "__editorExtras__": {},
+ "_parent": {
+ "__id__": 25
+ },
+ "_children": [],
+ "_active": true,
+ "_components": [
+ {
+ "__id__": 27
+ },
+ {
+ "__id__": 28
+ }
+ ],
+ "_prefab": null,
+ "_lpos": {
+ "__type__": "cc.Vec3",
+ "x": 0,
+ "y": 0,
+ "z": 0
+ },
+ "_lrot": {
+ "__type__": "cc.Quat",
+ "x": 0,
+ "y": 0,
+ "z": 0,
+ "w": 1
+ },
+ "_lscale": {
+ "__type__": "cc.Vec3",
+ "x": 1,
+ "y": 1,
+ "z": 1
+ },
+ "_mobility": 0,
+ "_layer": 33554432,
+ "_euler": {
+ "__type__": "cc.Vec3",
+ "x": 0,
+ "y": 0,
+ "z": 0
+ },
+ "_id": "dcjO1Ab2tDIbg6VVr9YHdO"
+ },
+ {
+ "__type__": "cc.UITransform",
+ "_name": "",
+ "_objFlags": 0,
+ "__editorExtras__": {},
+ "node": {
+ "__id__": 26
+ },
+ "_enabled": true,
+ "__prefab": null,
+ "_contentSize": {
+ "__type__": "cc.Size",
+ "width": 1080,
+ "height": 2560
+ },
+ "_anchorPoint": {
+ "__type__": "cc.Vec2",
+ "x": 0.5,
+ "y": 0.5
+ },
+ "_id": "8aW0b4lGxCVbal8zQBKbyB"
+ },
+ {
+ "__type__": "cc.Sprite",
+ "_name": "",
+ "_objFlags": 0,
+ "__editorExtras__": {},
+ "node": {
+ "__id__": 26
+ },
+ "_enabled": true,
+ "__prefab": null,
+ "_customMaterial": null,
+ "_srcBlendFactor": 2,
+ "_dstBlendFactor": 4,
+ "_color": {
+ "__type__": "cc.Color",
+ "r": 255,
+ "g": 255,
+ "b": 255,
+ "a": 255
+ },
+ "_spriteFrame": {
+ "__uuid__": "361c5873-d797-420e-be65-81c5a8f91215@f9941",
+ "__expectedType__": "cc.SpriteFrame"
+ },
+ "_type": 0,
+ "_fillType": 0,
+ "_sizeMode": 0,
+ "_fillCenter": {
+ "__type__": "cc.Vec2",
+ "x": 0,
+ "y": 0
+ },
+ "_fillStart": 0,
+ "_fillRange": 0,
+ "_isTrimmedMode": true,
+ "_useGrayscale": false,
+ "_atlas": null,
+ "_id": "37daNZffxGSq/F3WV+F0Y5"
+ },
+ {
+ "__type__": "cc.Node",
+ "_name": "WalkableLayer",
+ "_objFlags": 0,
+ "__editorExtras__": {},
+ "_parent": {
+ "__id__": 25
+ },
+ "_children": [],
+ "_active": true,
+ "_components": [
+ {
+ "__id__": 30
+ },
+ {
+ "__id__": 31
+ }
+ ],
+ "_prefab": null,
+ "_lpos": {
+ "__type__": "cc.Vec3",
+ "x": 0,
+ "y": 0,
+ "z": 0
+ },
+ "_lrot": {
+ "__type__": "cc.Quat",
+ "x": 0,
+ "y": 0,
+ "z": 0,
+ "w": 1
+ },
+ "_lscale": {
+ "__type__": "cc.Vec3",
+ "x": 1,
+ "y": 1,
+ "z": 1
+ },
+ "_mobility": 0,
+ "_layer": 33554432,
+ "_euler": {
+ "__type__": "cc.Vec3",
+ "x": 0,
+ "y": 0,
+ "z": 0
+ },
+ "_id": "23cuMKDVtPs71LOAe7QMgZ"
+ },
+ {
+ "__type__": "cc.UITransform",
+ "_name": "",
+ "_objFlags": 0,
+ "__editorExtras__": {},
+ "node": {
+ "__id__": 29
+ },
+ "_enabled": true,
+ "__prefab": null,
+ "_contentSize": {
+ "__type__": "cc.Size",
+ "width": 1056,
+ "height": 2560
+ },
+ "_anchorPoint": {
+ "__type__": "cc.Vec2",
+ "x": 0.5,
+ "y": 0.5
+ },
+ "_id": "e8IRovTjZNga4GC6wNHoIP"
+ },
+ {
+ "__type__": "cc.TiledLayer",
+ "_name": "",
+ "_objFlags": 0,
+ "__editorExtras__": {},
+ "node": {
+ "__id__": 29
+ },
+ "_enabled": true,
+ "__prefab": null,
+ "_customMaterial": null,
+ "_srcBlendFactor": 2,
+ "_dstBlendFactor": 4,
+ "_color": {
+ "__type__": "cc.Color",
+ "r": 255,
+ "g": 255,
+ "b": 255,
+ "a": 0
+ },
+ "_id": "30V2VyJEZCsKfZxqWiSZMJ"
+ },
+ {
+ "__type__": "cc.UITransform",
+ "_name": "",
+ "_objFlags": 0,
+ "__editorExtras__": {},
+ "node": {
+ "__id__": 25
+ },
+ "_enabled": true,
+ "__prefab": null,
"_contentSize": {
"__type__": "cc.Size",
"width": 1080,
@@ -881,7 +1200,7 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
- "__id__": 15
+ "__id__": 25
},
"_enabled": true,
"__prefab": null,
@@ -899,12 +1218,12 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
- "__id__": 15
+ "__id__": 25
},
"_enabled": true,
"__prefab": null,
"tiledMap": {
- "__id__": 23
+ "__id__": 33
},
"walkableLayerName": "WalkableLayer",
"tileSize": 32,
@@ -922,10 +1241,10 @@
"_active": true,
"_components": [
{
- "__id__": 26
+ "__id__": 36
},
{
- "__id__": 27
+ "__id__": 37
}
],
"_prefab": null,
@@ -964,7 +1283,7 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
- "__id__": 25
+ "__id__": 35
},
"_enabled": true,
"__prefab": null,
@@ -986,7 +1305,7 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
- "__id__": 25
+ "__id__": 35
},
"_enabled": true,
"__prefab": null,
@@ -1001,7 +1320,7 @@
},
"moveSpeed": 300,
"mapWidth": 1080,
- "mapHeight": 2560,
+ "mapHeight": 1920,
"_id": "c1AuAU3IlKnLOzgk9vsBr4"
},
{
@@ -1016,10 +1335,10 @@
"_active": true,
"_components": [
{
- "__id__": 29
+ "__id__": 39
},
{
- "__id__": 30
+ "__id__": 40
}
],
"_prefab": null,
@@ -1058,7 +1377,7 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
- "__id__": 28
+ "__id__": 38
},
"_enabled": true,
"__prefab": null,
@@ -1080,7 +1399,7 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
- "__id__": 28
+ "__id__": 38
},
"_enabled": true,
"__prefab": null,
@@ -1102,32 +1421,32 @@
},
"_children": [
{
- "__id__": 32
+ "__id__": 42
}
],
"_active": true,
"_components": [
{
- "__id__": 35
+ "__id__": 45
},
{
- "__id__": 36
+ "__id__": 46
},
{
- "__id__": 37
+ "__id__": 47
},
{
- "__id__": 38
+ "__id__": 48
},
{
- "__id__": 39
+ "__id__": 49
}
],
"_prefab": null,
"_lpos": {
"__type__": "cc.Vec3",
- "x": -96.499,
- "y": 22.269,
+ "x": 150.397,
+ "y": -541.622,
"z": 0
},
"_lrot": {
@@ -1159,16 +1478,16 @@
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
- "__id__": 31
+ "__id__": 41
},
"_children": [],
"_active": true,
"_components": [
{
- "__id__": 33
+ "__id__": 43
},
{
- "__id__": 34
+ "__id__": 44
}
],
"_prefab": null,
@@ -1207,7 +1526,7 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
- "__id__": 32
+ "__id__": 42
},
"_enabled": true,
"__prefab": null,
@@ -1229,7 +1548,7 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
- "__id__": 32
+ "__id__": 42
},
"_enabled": true,
"__prefab": null,
@@ -1291,7 +1610,7 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
- "__id__": 31
+ "__id__": 41
},
"_enabled": true,
"__prefab": null,
@@ -1313,7 +1632,7 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
- "__id__": 31
+ "__id__": 41
},
"_enabled": true,
"__prefab": null,
@@ -1352,7 +1671,7 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
- "__id__": 31
+ "__id__": 41
},
"_enabled": true,
"__prefab": null,
@@ -1383,7 +1702,7 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
- "__id__": 31
+ "__id__": 41
},
"_enabled": true,
"__prefab": null,
@@ -1411,7 +1730,7 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
- "__id__": 31
+ "__id__": 41
},
"_enabled": true,
"__prefab": null,
@@ -1504,28 +1823,28 @@
{
"__type__": "cc.SceneGlobals",
"ambient": {
- "__id__": 44
+ "__id__": 54
},
"shadows": {
- "__id__": 45
+ "__id__": 55
},
"_skybox": {
- "__id__": 46
+ "__id__": 56
},
"fog": {
- "__id__": 47
+ "__id__": 57
},
"octree": {
- "__id__": 48
+ "__id__": 58
},
"skin": {
- "__id__": 49
+ "__id__": 59
},
"lightProbeInfo": {
- "__id__": 50
+ "__id__": 60
},
"postSettings": {
- "__id__": 51
+ "__id__": 61
},
"bakedWithStationaryMainLight": false,
"bakedWithHighpLightmap": false
diff --git a/assets/scripts/CameraFollow.ts b/assets/scripts/CameraFollow.ts
index 176927f..bb623a3 100644
--- a/assets/scripts/CameraFollow.ts
+++ b/assets/scripts/CameraFollow.ts
@@ -20,7 +20,7 @@ export class CameraFollow extends Component {
mapWidth: number = 1080; // 地图宽度
@property
- mapHeight: number = 2560; // 地图高度
+ mapHeight: number = 1920; // 地图高度
private camera: Camera | null = null;
@@ -28,7 +28,7 @@ export class CameraFollow extends Component {
// 获取相机组件
this.camera = this.getComponent(Camera);
- this.camera.orthoHeight = 500
+ this.camera.orthoHeight = 680
if (!this.camera) {
console.error('CameraFollow: 未找到Camera组件');
}