From 247cf706f738b7ed545779fcffdf4aa6ecb1c4ea Mon Sep 17 00:00:00 2001 From: LMZ <1477077658@qq.com> Date: Mon, 23 Dec 2024 06:46:40 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9C=9F=E7=9A=84=E7=9C=9F=E7=9A=84=E8=A6=81?= =?UTF-8?q?=E4=B8=8B=E7=8F=AD=E5=95=A6=E5=95=A6=E5=95=A6=E5=95=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Lock.cs | 19 ++ Assets/Lock.cs.meta | 11 + Assets/Scenes/SampleScene111.unity | 439 ++++++++++++++++++++++++----- Assets/Scripts/ZZZZ/CameraMove.cs | 34 ++- 4 files changed, 435 insertions(+), 68 deletions(-) create mode 100644 Assets/Lock.cs create mode 100644 Assets/Lock.cs.meta diff --git a/Assets/Lock.cs b/Assets/Lock.cs new file mode 100644 index 0000000..4fef92c --- /dev/null +++ b/Assets/Lock.cs @@ -0,0 +1,19 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class Lock : MonoBehaviour +{ + // Start is called before the first frame update + public GameObject gameObject; + void Start() + { + + } + + // Update is called once per frame + void Update() + { + transform.LookAt(gameObject.transform.position); + } +} diff --git a/Assets/Lock.cs.meta b/Assets/Lock.cs.meta new file mode 100644 index 0000000..30f92ed --- /dev/null +++ b/Assets/Lock.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ecd9c124aea82464b96796ff541db232 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/SampleScene111.unity b/Assets/Scenes/SampleScene111.unity index 73e6230..1faa895 100644 --- a/Assets/Scenes/SampleScene111.unity +++ b/Assets/Scenes/SampleScene111.unity @@ -1004,6 +1004,7 @@ GameObject: - component: {fileID: 54062280} - component: {fileID: 54062279} - component: {fileID: 54062278} + - component: {fileID: 54062281} m_Layer: 0 m_Name: Quad (1) m_TagString: Untagged @@ -1021,7 +1022,7 @@ Transform: serializedVersion: 2 m_LocalRotation: {x: 0.25097963, y: 0.7115561, z: -0.102165475, w: 0.64827424} m_LocalPosition: {x: -26.99693, y: 19.95004, z: -28.961308} - m_LocalScale: {x: 5, y: 5, z: 5} + m_LocalScale: {x: 5, y: 5, z: -5} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 684451699} @@ -1098,6 +1099,19 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 54062276} m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &54062281 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 54062276} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ecd9c124aea82464b96796ff541db232, type: 3} + m_Name: + m_EditorClassIdentifier: + gameObject: {fileID: 963194225} --- !u!1 &54404479 GameObject: m_ObjectHideFlags: 0 @@ -1893,6 +1907,7 @@ GameObject: - component: {fileID: 120635607} - component: {fileID: 120635606} - component: {fileID: 120635605} + - component: {fileID: 120635608} m_Layer: 0 m_Name: Quad m_TagString: Untagged @@ -1910,8 +1925,8 @@ Transform: serializedVersion: 2 m_LocalRotation: {x: -0.081749976, y: 0.88170874, z: -0.18563597, w: -0.42596465} m_LocalPosition: {x: 13.116524, y: 6.21, z: -9.23839} - m_LocalScale: {x: 5, y: 5, z: 5} - m_ConstrainProportionsScale: 1 + m_LocalScale: {x: 5, y: 5, z: -5} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1449078576} m_LocalEulerAnglesHint: {x: 23.391, y: 47.734, z: 0.873} @@ -1987,6 +2002,19 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 120635603} m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &120635608 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 120635603} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ecd9c124aea82464b96796ff541db232, type: 3} + m_Name: + m_EditorClassIdentifier: + gameObject: {fileID: 963194225} --- !u!1 &121700980 GameObject: m_ObjectHideFlags: 0 @@ -3908,6 +3936,7 @@ GameObject: - component: {fileID: 254099345} - component: {fileID: 254099344} - component: {fileID: 254099343} + - component: {fileID: 254099346} m_Layer: 0 m_Name: Quad m_TagString: Untagged @@ -3925,7 +3954,7 @@ Transform: serializedVersion: 2 m_LocalRotation: {x: 0.2128556, y: 0.18632665, z: -0.049171228, w: 0.95789206} m_LocalPosition: {x: -7.35, y: 10.39, z: -8.83} - m_LocalScale: {x: 4, y: 4, z: 4} + m_LocalScale: {x: 4, y: 4, z: -4} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1984145566} @@ -4002,6 +4031,19 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 254099341} m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &254099346 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 254099341} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ecd9c124aea82464b96796ff541db232, type: 3} + m_Name: + m_EditorClassIdentifier: + gameObject: {fileID: 963194225} --- !u!1001 &255675989 PrefabInstance: m_ObjectHideFlags: 0 @@ -4984,6 +5026,7 @@ GameObject: - component: {fileID: 334390981} - component: {fileID: 334390980} - component: {fileID: 334390979} + - component: {fileID: 334390982} m_Layer: 0 m_Name: Quad m_TagString: Untagged @@ -4999,13 +5042,13 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 334390977} serializedVersion: 2 - m_LocalRotation: {x: 0.15411837, y: 0.61326075, z: -0.15658163, w: 0.75871015} - m_LocalPosition: {x: -20.514894, y: 16.3, z: -10.518185} - m_LocalScale: {x: 5, y: 5, z: 5} - m_ConstrainProportionsScale: 1 + m_LocalRotation: {x: 0.13104926, y: 0.5027563, z: -0.17634161, w: 0.83604175} + m_LocalPosition: {x: -22.07052, y: 17.111029, z: -12.169685} + m_LocalScale: {x: 5, y: 5, z: -5} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 238851289} - m_LocalEulerAnglesHint: {x: 25.208, y: 77.209, z: -3.077} + m_LocalEulerAnglesHint: {x: 23.356, y: 59.921, z: -10.232} --- !u!64 &334390979 MeshCollider: m_ObjectHideFlags: 0 @@ -5078,6 +5121,19 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 334390977} m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &334390982 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 334390977} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ecd9c124aea82464b96796ff541db232, type: 3} + m_Name: + m_EditorClassIdentifier: + gameObject: {fileID: 963194225} --- !u!1 &361558561 GameObject: m_ObjectHideFlags: 0 @@ -7457,6 +7513,7 @@ GameObject: - component: {fileID: 579340689} - component: {fileID: 579340688} - component: {fileID: 579340687} + - component: {fileID: 579340690} m_Layer: 0 m_Name: Quad (2) m_TagString: Untagged @@ -7472,13 +7529,13 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 579340685} serializedVersion: 2 - m_LocalRotation: {x: 0.15411837, y: 0.61326075, z: -0.15658163, w: 0.75871015} - m_LocalPosition: {x: -20.541925, y: 16.371964, z: -19.687927} - m_LocalScale: {x: 5, y: 5, z: 5} - m_ConstrainProportionsScale: 1 + m_LocalRotation: {x: 0.13104926, y: 0.5027563, z: -0.17634161, w: 0.83604175} + m_LocalPosition: {x: -19.837679, y: 16.100414, z: -21.006126} + m_LocalScale: {x: 5, y: 5, z: -5} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 238851289} - m_LocalEulerAnglesHint: {x: 25.208, y: 77.209, z: -3.077} + m_LocalEulerAnglesHint: {x: 23.356, y: 59.921, z: -10.232} --- !u!64 &579340687 MeshCollider: m_ObjectHideFlags: 0 @@ -7551,6 +7608,19 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 579340685} m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &579340690 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 579340685} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ecd9c124aea82464b96796ff541db232, type: 3} + m_Name: + m_EditorClassIdentifier: + gameObject: {fileID: 963194225} --- !u!1 &580233687 GameObject: m_ObjectHideFlags: 0 @@ -9305,6 +9375,7 @@ GameObject: - component: {fileID: 733286749} - component: {fileID: 733286748} - component: {fileID: 733286747} + - component: {fileID: 733286750} m_Layer: 0 m_Name: Quad (2) m_TagString: Untagged @@ -9322,7 +9393,7 @@ Transform: serializedVersion: 2 m_LocalRotation: {x: 0.25097963, y: 0.7115561, z: -0.102165475, w: 0.64827424} m_LocalPosition: {x: -10.077174, y: 19.68464, z: -31.45572} - m_LocalScale: {x: 5, y: 5, z: 5} + m_LocalScale: {x: 5, y: 5, z: -5} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 684451699} @@ -9399,6 +9470,19 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 733286745} m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &733286750 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 733286745} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ecd9c124aea82464b96796ff541db232, type: 3} + m_Name: + m_EditorClassIdentifier: + gameObject: {fileID: 963194225} --- !u!1001 &738194043 PrefabInstance: m_ObjectHideFlags: 0 @@ -10238,6 +10322,7 @@ GameObject: - component: {fileID: 763445194} - component: {fileID: 763445193} - component: {fileID: 763445192} + - component: {fileID: 763445195} m_Layer: 0 m_Name: Quad (1) m_TagString: Untagged @@ -10255,7 +10340,7 @@ Transform: serializedVersion: 2 m_LocalRotation: {x: 0.20306231, y: 0.58981574, z: -0.15898173, w: 0.7652502} m_LocalPosition: {x: -3.5211296, y: 14.899524, z: -10.810969} - m_LocalScale: {x: 5, y: 5, z: 5} + m_LocalScale: {x: 5, y: 5, z: -5} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1320823252} @@ -10332,6 +10417,19 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 763445190} m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &763445195 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 763445190} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ecd9c124aea82464b96796ff541db232, type: 3} + m_Name: + m_EditorClassIdentifier: + gameObject: {fileID: 963194225} --- !u!1 &768539689 GameObject: m_ObjectHideFlags: 0 @@ -10556,6 +10654,7 @@ GameObject: - component: {fileID: 791608190} - component: {fileID: 791608189} - component: {fileID: 791608188} + - component: {fileID: 791608191} m_Layer: 0 m_Name: Quad m_TagString: Untagged @@ -10573,8 +10672,8 @@ Transform: serializedVersion: 2 m_LocalRotation: {x: 0.15930781, y: 0.3660342, z: -0.15711898, w: 0.90330154} m_LocalPosition: {x: -3.8000002, y: 22.5, z: -19.400002} - m_LocalScale: {x: 6, y: 6, z: 6} - m_ConstrainProportionsScale: 1 + m_LocalScale: {x: 6, y: 6, z: -6} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 852886722} m_LocalEulerAnglesHint: {x: 23.755, y: 41.897, z: -10.527} @@ -10650,6 +10749,19 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 791608186} m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &791608191 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 791608186} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ecd9c124aea82464b96796ff541db232, type: 3} + m_Name: + m_EditorClassIdentifier: + gameObject: {fileID: 963194225} --- !u!1 &793533581 GameObject: m_ObjectHideFlags: 0 @@ -11903,6 +12015,7 @@ GameObject: - component: {fileID: 915359255} - component: {fileID: 915359254} - component: {fileID: 915359253} + - component: {fileID: 915359256} m_Layer: 0 m_Name: Quad m_TagString: Untagged @@ -11920,7 +12033,7 @@ Transform: serializedVersion: 2 m_LocalRotation: {x: 0.25097963, y: 0.7115561, z: -0.102165475, w: 0.64827424} m_LocalPosition: {x: -24.478266, y: 19.91615, z: -11.841002} - m_LocalScale: {x: 5, y: 5, z: 5} + m_LocalScale: {x: 5, y: 5, z: -5} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 684451699} @@ -11997,6 +12110,19 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 915359251} m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &915359256 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 915359251} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ecd9c124aea82464b96796ff541db232, type: 3} + m_Name: + m_EditorClassIdentifier: + gameObject: {fileID: 963194225} --- !u!1 &917234242 GameObject: m_ObjectHideFlags: 0 @@ -12622,7 +12748,7 @@ Camera: far clip plane: 2037.6 field of view: 60 orthographic: 1 - orthographic size: 24.02 + orthographic size: 47.41 m_Depth: -1 m_CullingMask: serializedVersion: 2 @@ -12647,7 +12773,7 @@ Transform: m_GameObject: {fileID: 963194225} serializedVersion: 2 m_LocalRotation: {x: 0.2841821, y: 0.44483197, z: -0.14971161, w: 0.8360332} - m_LocalPosition: {x: -70.90813, y: 39.50828, z: -47.667553} + m_LocalPosition: {x: -117.21, y: 59.95, z: -53.01} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] @@ -12665,11 +12791,14 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: a266ab3dc68d8f84d90aae5e8f6ba88e, type: 3} m_Name: m_EditorClassIdentifier: - point1: {x: -50, y: 8.467616, z: -34.03909} - point2: {x: 10.992965, y: 35.554337, z: -87.564514} - point3: {x: -19.909672, y: 50, z: 54.729023} - point4: {x: -46.173878, y: 19.88333, z: 73.34636} + point1: {x: -129.2, y: 63.3, z: -30.6} + point2: {x: -117.21, y: 59.95, z: -53.01} + point3: {x: -90.8, y: 91.8, z: -180.8} + point4: {x: -107.59, y: 116.9, z: 10.98} moveSpeed: 15 + zoomSpeed: 10 + minZoom: 9 + maxZoom: 48 --- !u!1 &979034611 GameObject: m_ObjectHideFlags: 0 @@ -14690,6 +14819,7 @@ GameObject: - component: {fileID: 1110228785} - component: {fileID: 1110228784} - component: {fileID: 1110228783} + - component: {fileID: 1110228786} m_Layer: 0 m_Name: Quad (4) m_TagString: Untagged @@ -14705,13 +14835,13 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1110228781} serializedVersion: 2 - m_LocalRotation: {x: 0.15411837, y: 0.61326075, z: -0.15658163, w: 0.75871015} - m_LocalPosition: {x: -20.55656, y: 16.410969, z: -24.657738} - m_LocalScale: {x: 5, y: 5, z: 5} - m_ConstrainProportionsScale: 1 + m_LocalRotation: {x: 0.13104926, y: 0.5027563, z: -0.17634161, w: 0.83604175} + m_LocalPosition: {x: -18.627493, y: 15.552674, z: -25.795334} + m_LocalScale: {x: 5, y: 5, z: -5} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 238851289} - m_LocalEulerAnglesHint: {x: 25.208, y: 77.209, z: -3.077} + m_LocalEulerAnglesHint: {x: 23.356, y: 59.921, z: -10.232} --- !u!64 &1110228783 MeshCollider: m_ObjectHideFlags: 0 @@ -14784,6 +14914,19 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1110228781} m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &1110228786 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1110228781} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ecd9c124aea82464b96796ff541db232, type: 3} + m_Name: + m_EditorClassIdentifier: + gameObject: {fileID: 963194225} --- !u!1 &1112820594 GameObject: m_ObjectHideFlags: 0 @@ -14796,6 +14939,7 @@ GameObject: - component: {fileID: 1112820598} - component: {fileID: 1112820597} - component: {fileID: 1112820596} + - component: {fileID: 1112820599} m_Layer: 0 m_Name: Quad (1) m_TagString: Untagged @@ -14813,7 +14957,7 @@ Transform: serializedVersion: 2 m_LocalRotation: {x: 0.2128556, y: 0.18632665, z: -0.049171228, w: 0.95789206} m_LocalPosition: {x: -1.7, y: 10.39, z: -8.64} - m_LocalScale: {x: 4, y: 4, z: 4} + m_LocalScale: {x: 4, y: 4, z: -4} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1984145566} @@ -14890,6 +15034,19 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1112820594} m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &1112820599 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1112820594} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ecd9c124aea82464b96796ff541db232, type: 3} + m_Name: + m_EditorClassIdentifier: + gameObject: {fileID: 963194225} --- !u!1 &1122427788 GameObject: m_ObjectHideFlags: 0 @@ -15326,6 +15483,7 @@ GameObject: - component: {fileID: 1132273397} - component: {fileID: 1132273396} - component: {fileID: 1132273395} + - component: {fileID: 1132273398} m_Layer: 0 m_Name: Quad (3) m_TagString: Untagged @@ -15343,7 +15501,7 @@ Transform: serializedVersion: 2 m_LocalRotation: {x: 0.2128556, y: 0.18632665, z: -0.049171228, w: 0.95789206} m_LocalPosition: {x: 8.44, y: 10.39, z: -8.27} - m_LocalScale: {x: 4, y: 4, z: 4} + m_LocalScale: {x: 4, y: 4, z: -4} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1984145566} @@ -15420,6 +15578,19 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1132273393} m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &1132273398 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1132273393} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ecd9c124aea82464b96796ff541db232, type: 3} + m_Name: + m_EditorClassIdentifier: + gameObject: {fileID: 963194225} --- !u!1 &1144061266 GameObject: m_ObjectHideFlags: 0 @@ -15432,6 +15603,7 @@ GameObject: - component: {fileID: 1144061270} - component: {fileID: 1144061269} - component: {fileID: 1144061268} + - component: {fileID: 1144061271} m_Layer: 0 m_Name: Quad (7) m_TagString: Untagged @@ -15447,13 +15619,13 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1144061266} serializedVersion: 2 - m_LocalRotation: {x: 0.15411837, y: 0.61326075, z: -0.15658163, w: 0.75871015} - m_LocalPosition: {x: -11.502014, y: 16.101624, z: -10.82637} - m_LocalScale: {x: 5, y: 5, z: 5} - m_ConstrainProportionsScale: 1 + m_LocalRotation: {x: 0.13104926, y: 0.5027563, z: -0.17634161, w: 0.83604175} + m_LocalPosition: {x: -13.267455, y: 16.906883, z: -10.212532} + m_LocalScale: {x: 5, y: 5, z: -5} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 238851289} - m_LocalEulerAnglesHint: {x: 25.208, y: 77.209, z: -3.077} + m_LocalEulerAnglesHint: {x: 23.356, y: 59.921, z: -10.232} --- !u!64 &1144061268 MeshCollider: m_ObjectHideFlags: 0 @@ -15526,6 +15698,19 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1144061266} m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &1144061271 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1144061266} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ecd9c124aea82464b96796ff541db232, type: 3} + m_Name: + m_EditorClassIdentifier: + gameObject: {fileID: 963194225} --- !u!1001 &1145840357 PrefabInstance: m_ObjectHideFlags: 0 @@ -16124,6 +16309,7 @@ GameObject: - component: {fileID: 1189324970} - component: {fileID: 1189324969} - component: {fileID: 1189324968} + - component: {fileID: 1189324971} m_Layer: 0 m_Name: Quad (5) m_TagString: Untagged @@ -16139,13 +16325,13 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1189324966} serializedVersion: 2 - m_LocalRotation: {x: 0.15411837, y: 0.61326075, z: -0.15658163, w: 0.75871015} - m_LocalPosition: {x: -11.530378, y: 16.177122, z: -20.445953} - m_LocalScale: {x: 5, y: 5, z: 5} - m_ConstrainProportionsScale: 1 + m_LocalRotation: {x: 0.13104926, y: 0.5027563, z: -0.17634161, w: 0.83604175} + m_LocalPosition: {x: -10.925054, y: 15.846696, z: -19.482506} + m_LocalScale: {x: 5, y: 5, z: -5} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 238851289} - m_LocalEulerAnglesHint: {x: 25.208, y: 77.209, z: -3.077} + m_LocalEulerAnglesHint: {x: 23.356, y: 59.921, z: -10.232} --- !u!64 &1189324968 MeshCollider: m_ObjectHideFlags: 0 @@ -16218,6 +16404,19 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1189324966} m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &1189324971 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1189324966} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ecd9c124aea82464b96796ff541db232, type: 3} + m_Name: + m_EditorClassIdentifier: + gameObject: {fileID: 963194225} --- !u!1 &1200107247 GameObject: m_ObjectHideFlags: 0 @@ -16442,6 +16641,7 @@ GameObject: - component: {fileID: 1243314489} - component: {fileID: 1243314488} - component: {fileID: 1243314487} + - component: {fileID: 1243314490} m_Layer: 0 m_Name: Quad (3) m_TagString: Untagged @@ -16459,7 +16659,7 @@ Transform: serializedVersion: 2 m_LocalRotation: {x: 0.25097963, y: 0.7115561, z: -0.102165475, w: 0.64827424} m_LocalPosition: {x: -7.4971724, y: 19.64996, z: -13.8391695} - m_LocalScale: {x: 5, y: 5, z: 5} + m_LocalScale: {x: 5, y: 5, z: -5} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 684451699} @@ -16536,6 +16736,19 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1243314485} m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &1243314490 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1243314485} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ecd9c124aea82464b96796ff541db232, type: 3} + m_Name: + m_EditorClassIdentifier: + gameObject: {fileID: 963194225} --- !u!1001 &1252646466 PrefabInstance: m_ObjectHideFlags: 0 @@ -16817,6 +17030,7 @@ GameObject: - component: {fileID: 1262727676} - component: {fileID: 1262727675} - component: {fileID: 1262727674} + - component: {fileID: 1262727677} m_Layer: 0 m_Name: Quad m_TagString: Untagged @@ -16834,8 +17048,8 @@ Transform: serializedVersion: 2 m_LocalRotation: {x: 0.20995556, y: 0.46390614, z: -0.07948808, w: 0.8569665} m_LocalPosition: {x: 1.86, y: 11.83, z: -12.450001} - m_LocalScale: {x: 4, y: 4, z: 4} - m_ConstrainProportionsScale: 1 + m_LocalScale: {x: 4, y: 4, z: -4} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1718711285} m_LocalEulerAnglesHint: {x: 25.696, y: 57.707, z: 3.726} @@ -16911,6 +17125,19 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1262727672} m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &1262727677 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1262727672} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ecd9c124aea82464b96796ff541db232, type: 3} + m_Name: + m_EditorClassIdentifier: + gameObject: {fileID: 963194225} --- !u!1 &1274493060 GameObject: m_ObjectHideFlags: 0 @@ -17147,6 +17374,7 @@ GameObject: - component: {fileID: 1306058561} - component: {fileID: 1306058560} - component: {fileID: 1306058559} + - component: {fileID: 1306058562} m_Layer: 0 m_Name: Quad m_TagString: Untagged @@ -17164,7 +17392,7 @@ Transform: serializedVersion: 2 m_LocalRotation: {x: 0.20306231, y: 0.58981574, z: -0.15898173, w: 0.7652502} m_LocalPosition: {x: -18.178871, y: 13.500476, z: -8.889031} - m_LocalScale: {x: 5, y: 5, z: 5} + m_LocalScale: {x: 5, y: 5, z: -5} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1320823252} @@ -17241,6 +17469,19 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1306058557} m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &1306058562 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1306058557} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ecd9c124aea82464b96796ff541db232, type: 3} + m_Name: + m_EditorClassIdentifier: + gameObject: {fileID: 963194225} --- !u!1001 &1314792157 PrefabInstance: m_ObjectHideFlags: 0 @@ -20243,6 +20484,7 @@ GameObject: - component: {fileID: 1583681746} - component: {fileID: 1583681745} - component: {fileID: 1583681744} + - component: {fileID: 1583681747} m_Layer: 0 m_Name: Quad (1) m_TagString: Untagged @@ -20258,13 +20500,13 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1583681742} serializedVersion: 2 - m_LocalRotation: {x: 0.15411837, y: 0.61326075, z: -0.15658163, w: 0.75871015} - m_LocalPosition: {x: -20.529144, y: 16.337982, z: -15.358025} - m_LocalScale: {x: 5, y: 5, z: 5} - m_ConstrainProportionsScale: 1 + m_LocalRotation: {x: 0.13104926, y: 0.5027563, z: -0.17634161, w: 0.83604175} + m_LocalPosition: {x: -20.891996, y: 16.577616, z: -16.833618} + m_LocalScale: {x: 5, y: 5, z: -5} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 238851289} - m_LocalEulerAnglesHint: {x: 25.208, y: 77.209, z: -3.077} + m_LocalEulerAnglesHint: {x: 23.356, y: 59.921, z: -10.232} --- !u!64 &1583681744 MeshCollider: m_ObjectHideFlags: 0 @@ -20337,6 +20579,19 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1583681742} m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &1583681747 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1583681742} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ecd9c124aea82464b96796ff541db232, type: 3} + m_Name: + m_EditorClassIdentifier: + gameObject: {fileID: 963194225} --- !u!1 &1596102600 GameObject: m_ObjectHideFlags: 0 @@ -21137,6 +21392,7 @@ GameObject: - component: {fileID: 1636934276} - component: {fileID: 1636934275} - component: {fileID: 1636934274} + - component: {fileID: 1636934277} m_Layer: 0 m_Name: Quad (3) m_TagString: Untagged @@ -21152,13 +21408,13 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1636934272} serializedVersion: 2 - m_LocalRotation: {x: 0.15411837, y: 0.61326075, z: -0.15658163, w: 0.75871015} - m_LocalPosition: {x: -10.158005, y: 14.340042, z: -24.054604} - m_LocalScale: {x: 5, y: 5, z: 5} - m_ConstrainProportionsScale: 1 + m_LocalRotation: {x: 0.13104926, y: 0.5027563, z: -0.17634161, w: 0.83604175} + m_LocalPosition: {x: -8.755028, y: 13.601102, z: -22.402931} + m_LocalScale: {x: 5, y: 5, z: -5} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 238851289} - m_LocalEulerAnglesHint: {x: 25.208, y: 77.209, z: -3.077} + m_LocalEulerAnglesHint: {x: 23.356, y: 59.921, z: -10.232} --- !u!64 &1636934274 MeshCollider: m_ObjectHideFlags: 0 @@ -21231,6 +21487,19 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1636934272} m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &1636934277 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1636934272} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ecd9c124aea82464b96796ff541db232, type: 3} + m_Name: + m_EditorClassIdentifier: + gameObject: {fileID: 963194225} --- !u!1 &1637276181 GameObject: m_ObjectHideFlags: 0 @@ -23566,6 +23835,7 @@ GameObject: - component: {fileID: 1868054327} - component: {fileID: 1868054326} - component: {fileID: 1868054325} + - component: {fileID: 1868054328} m_Layer: 0 m_Name: Quad (2) m_TagString: Untagged @@ -23583,7 +23853,7 @@ Transform: serializedVersion: 2 m_LocalRotation: {x: 0.2128556, y: 0.18632665, z: -0.049171228, w: 0.95789206} m_LocalPosition: {x: 2.86, y: 10.39, z: -8.47} - m_LocalScale: {x: 4, y: 4, z: 4} + m_LocalScale: {x: 4, y: 4, z: -4} m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 1984145566} @@ -23660,6 +23930,19 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1868054323} m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &1868054328 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1868054323} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ecd9c124aea82464b96796ff541db232, type: 3} + m_Name: + m_EditorClassIdentifier: + gameObject: {fileID: 963194225} --- !u!1 &1878888071 GameObject: m_ObjectHideFlags: 0 @@ -23672,6 +23955,7 @@ GameObject: - component: {fileID: 1878888075} - component: {fileID: 1878888074} - component: {fileID: 1878888073} + - component: {fileID: 1878888076} m_Layer: 0 m_Name: Quad m_TagString: Untagged @@ -23689,8 +23973,8 @@ Transform: serializedVersion: 2 m_LocalRotation: {x: 0.080456905, y: 0.9183662, z: -0.24865413, w: 0.29715535} m_LocalPosition: {x: 0.5467001, y: 0.032, z: -0.10639999} - m_LocalScale: {x: 0.03, y: 0.03, z: 0.03} - m_ConstrainProportionsScale: 1 + m_LocalScale: {x: 0.03, y: 0.03, z: -0.03} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 271719946} m_LocalEulerAnglesHint: {x: 30.3, y: 144.14, z: 0} @@ -23766,6 +24050,19 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1878888071} m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &1878888076 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1878888071} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ecd9c124aea82464b96796ff541db232, type: 3} + m_Name: + m_EditorClassIdentifier: + gameObject: {fileID: 963194225} --- !u!1 &1882637263 GameObject: m_ObjectHideFlags: 0 @@ -24538,6 +24835,7 @@ GameObject: - component: {fileID: 1945238562} - component: {fileID: 1945238561} - component: {fileID: 1945238560} + - component: {fileID: 1945238563} m_Layer: 0 m_Name: Quad (6) m_TagString: Untagged @@ -24553,13 +24851,13 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1945238558} serializedVersion: 2 - m_LocalRotation: {x: 0.15411837, y: 0.61326075, z: -0.15658163, w: 0.75871015} - m_LocalPosition: {x: -11.515854, y: 16.138504, z: -15.526169} - m_LocalScale: {x: 5, y: 5, z: 5} - m_ConstrainProportionsScale: 1 + m_LocalRotation: {x: 0.13104926, y: 0.5027563, z: -0.17634161, w: 0.83604175} + m_LocalPosition: {x: -12.123019, y: 16.388906, z: -14.741524} + m_LocalScale: {x: 5, y: 5, z: -5} + m_ConstrainProportionsScale: 0 m_Children: [] m_Father: {fileID: 238851289} - m_LocalEulerAnglesHint: {x: 25.208, y: 77.209, z: -3.077} + m_LocalEulerAnglesHint: {x: 23.356, y: 59.921, z: -10.232} --- !u!64 &1945238560 MeshCollider: m_ObjectHideFlags: 0 @@ -24632,6 +24930,19 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1945238558} m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} +--- !u!114 &1945238563 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1945238558} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ecd9c124aea82464b96796ff541db232, type: 3} + m_Name: + m_EditorClassIdentifier: + gameObject: {fileID: 963194225} --- !u!1001 &1968743104 PrefabInstance: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/ZZZZ/CameraMove.cs b/Assets/Scripts/ZZZZ/CameraMove.cs index ca040a5..3ce4dc7 100644 --- a/Assets/Scripts/ZZZZ/CameraMove.cs +++ b/Assets/Scripts/ZZZZ/CameraMove.cs @@ -5,16 +5,24 @@ using UnityEngine; public class CameraMove : MonoBehaviour { // 需要限制相机移动的四个点 - public Vector3 point1 = new Vector3(-50, 8.46761608f, -34.0390892f); - public Vector3 point2 = new Vector3(10.9929647f, 35.5543365f, -87.5645142f); - public Vector3 point3 = new Vector3(-19.9096718f, 50f, 54.729023f); - public Vector3 point4 = new Vector3(-46.1738777f, 19.8833294f, 73.3463593f); + public Vector3 point1 = new Vector3(-81.1299973f, 81.5f, -77.0500031f); + public Vector3 point2 = new Vector3(-60.4000015f, 94f, -90.8000031f); + public Vector3 point3 = new Vector3(-93.8499985f, 104.580002f, -26.5200005f); + public Vector3 point4 = new Vector3(-95.9000015f, 92f, 6.80000019f); public float moveSpeed = 5f; // 相机移动的速度 + public float zoomSpeed = 2f; // 相机缩放的速度 + public float minZoom = 5f; // 最小缩放值 + public float maxZoom = 20f; // 最大缩放值 + private Vector3 lastMousePosition; // 上一次鼠标位置 + private Camera cam; // 摄像机组件 void Start() { + // 获取摄像机组件 + cam = GetComponent(); + // 初始化鼠标位置 lastMousePosition = Input.mousePosition; } @@ -22,6 +30,7 @@ public class CameraMove : MonoBehaviour void Update() { HandleMouseMovement(); + HandleZoom(); } // 处理鼠标点击移动摄像头 @@ -70,4 +79,21 @@ public class CameraMove : MonoBehaviour lastMousePosition = Input.mousePosition; } } + + // 处理鼠标滚轮缩放摄像头 + private void HandleZoom() + { + // 获取鼠标滚轮的输入 + float scrollInput = Input.GetAxis("Mouse ScrollWheel"); + + // 根据滚轮输入调整相机的正交大小 + if (scrollInput != 0) + { + // 调整正交相机的大小 + cam.orthographicSize -= scrollInput * zoomSpeed; + + // 限制相机的缩放范围 + cam.orthographicSize = Mathf.Clamp(cam.orthographicSize, minZoom, maxZoom); + } + } } \ No newline at end of file