diff --git a/Assets/Zion/Scenes/AdamTraining_pilot_terminal_panl 1.unity b/Assets/Zion/Scenes/AdamTraining_pilot_terminal_panl 1.unity index 49023568..8dd503a2 100644 --- a/Assets/Zion/Scenes/AdamTraining_pilot_terminal_panl 1.unity +++ b/Assets/Zion/Scenes/AdamTraining_pilot_terminal_panl 1.unity @@ -38,7 +38,7 @@ RenderSettings: m_ReflectionIntensity: 1 m_CustomReflection: {fileID: 0} m_Sun: {fileID: 1113159741} - m_IndirectSpecularColor: {r: 0.16230631, g: 0.30614048, b: 0.6693472, a: 1} + m_IndirectSpecularColor: {r: 0.017637905, g: 0.031211179, b: 0.06785975, a: 1} m_UseRadianceAmbientProbe: 0 --- !u!157 &3 LightmapSettings: @@ -5379,7 +5379,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: -210, y: 110} + m_AnchoredPosition: {x: -210, y: 0} m_SizeDelta: {x: 65, y: 55} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &32934856 @@ -6690,7 +6690,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: -210, y: 165} + m_AnchoredPosition: {x: -210, y: 55} m_SizeDelta: {x: 65, y: 55} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &132976236 @@ -47383,7 +47383,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: -210, y: 55} + m_AnchoredPosition: {x: -210, y: -55} m_SizeDelta: {x: 65, y: 55} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &921893238 @@ -48488,7 +48488,7 @@ RectTransform: m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 1, y: 1} m_AnchoredPosition: {x: 0, y: -0.000030517578} - m_SizeDelta: {x: 0, y: 50} + m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 1} --- !u!114 &996536657 MonoBehaviour: @@ -53144,11 +53144,11 @@ Camera: y: 0 width: 1 height: 1 - near clip plane: 0.3 + near clip plane: 0 far clip plane: 1000 field of view: 60 orthographic: 1 - orthographic size: 1179 + orthographic size: 1120 m_Depth: 0 m_CullingMask: serializedVersion: 2 @@ -53944,7 +53944,6 @@ GameObject: - component: {fileID: 1436809529} - component: {fileID: 1436809534} - component: {fileID: 1436809535} - - component: {fileID: 1436809536} m_Layer: 0 m_Name: Bootstraps m_TagString: Untagged @@ -54117,32 +54116,6 @@ MonoBehaviour: devices: [] isOnlyOne: 1 unmannedAerialVehicleManages: [] ---- !u!114 &1436809536 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1436809528} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 740db79d064790148b2b2fe78986e038, type: 3} - m_Name: - m_EditorClassIdentifier: - UAV_DronePosition: DronePosition - UAV_SingleDronePosition: SingleDronePosition - UAV_WRJExpel: WRJExpel - UAV_DroneWasDestroyed: DroneWasDestroyed - UAV_WRJDitch: WRJDitch - UAV_Planedata: Planedata - LBADW_Lasing: Lasing - LBADW_Micow: Micow - LBADW_SetToBeDestroyed: SetToBeDestroyed - SetToBeDestroyedTwo: SetToBeDestroyedTwo - BandSetting: BandSetting - SweepFrequencyBand: SweepFrequencyBand - KeyTarget: KeyTarget - identification: --- !u!1 &1444599844 GameObject: m_ObjectHideFlags: 0 @@ -65544,6 +65517,16 @@ PrefabInstance: propertyPath: m_AnchorMax.y value: 0 objectReference: {fileID: 0} + - target: {fileID: 1561597386300646505, guid: c3d92615a09597d46aa740923029c15d, + type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 1690237338199029568, guid: c3d92615a09597d46aa740923029c15d, + type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} - target: {fileID: 1693121673111326432, guid: c3d92615a09597d46aa740923029c15d, type: 3} propertyPath: m_AnchorMax.x @@ -65564,6 +65547,16 @@ PrefabInstance: propertyPath: m_IsActive value: 1 objectReference: {fileID: 0} + - target: {fileID: 2927603212027581197, guid: c3d92615a09597d46aa740923029c15d, + type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3410451424682802294, guid: c3d92615a09597d46aa740923029c15d, + type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} - target: {fileID: 3691389793902075663, guid: c3d92615a09597d46aa740923029c15d, type: 3} propertyPath: m_Name @@ -65574,6 +65567,11 @@ PrefabInstance: propertyPath: m_Enabled value: 0 objectReference: {fileID: 0} + - target: {fileID: 4239324281361100925, guid: c3d92615a09597d46aa740923029c15d, + type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} - target: {fileID: 4655910692261985928, guid: c3d92615a09597d46aa740923029c15d, type: 3} propertyPath: m_IsActive @@ -65719,6 +65717,16 @@ PrefabInstance: propertyPath: m_IsActive value: 0 objectReference: {fileID: 0} + - target: {fileID: 8101603123472128701, guid: c3d92615a09597d46aa740923029c15d, + type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 8297275301161124839, guid: c3d92615a09597d46aa740923029c15d, + type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} - target: {fileID: 8589009349407657109, guid: c3d92615a09597d46aa740923029c15d, type: 3} propertyPath: m_IsActive @@ -66469,7 +66477,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 0 + m_IsActive: 1 --- !u!224 &1657643401 RectTransform: m_ObjectHideFlags: 0 @@ -67577,7 +67585,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 0 + m_IsActive: 1 --- !u!224 &1712588403 RectTransform: m_ObjectHideFlags: 0 @@ -67779,7 +67787,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 0 + m_IsActive: 1 --- !u!224 &1719983406 RectTransform: m_ObjectHideFlags: 0 @@ -67823,6 +67831,11 @@ MonoBehaviour: type: 3} redShowImage: {fileID: 628155341} blueShowImage: {fileID: 338894529} + upBtn: {fileID: 6368481658342163396} + downBtn: {fileID: 6368481659336096937} + distance: 0 + isScale: 0 + satelliteImagery: {fileID: 1378295488} --- !u!1 &1720385560 GameObject: m_ObjectHideFlags: 0 @@ -67858,7 +67871,7 @@ RectTransform: m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 1, y: 1} m_AnchoredPosition: {x: 0, y: -0.000030517578} - m_SizeDelta: {x: 0, y: 50} + m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 1} --- !u!114 &1720385562 MonoBehaviour: @@ -69785,7 +69798,7 @@ MonoBehaviour: m_PreInfinity: 2 m_PostInfinity: 2 m_RotationOrder: 4 - randSeed: 28562453 + randSeed: 401617593 isDoingTransition: 0 minimumHeight: 0 --- !u!114 &1820978574 @@ -97946,7 +97959,7 @@ RectTransform: m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 1, y: 1} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: -948, y: 10} + m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0, y: 1} --- !u!114 &6368481658076565719 MonoBehaviour: @@ -98089,7 +98102,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 0 + m_IsActive: 1 --- !u!224 &6368481658342163399 RectTransform: m_ObjectHideFlags: 0 @@ -99083,7 +99096,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 0 + m_IsActive: 1 --- !u!114 &6368481659336096942 MonoBehaviour: m_ObjectHideFlags: 0 @@ -99502,7 +99515,7 @@ RectTransform: m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} + m_AnchorMax: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 20, y: 20} m_Pivot: {x: 0.5, y: 0.5} @@ -99811,9 +99824,9 @@ RectTransform: m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} + m_AnchorMax: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: -7, y: 0} + m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0, y: 1} --- !u!114 &6368481659665436127 MonoBehaviour: diff --git a/Assets/Zion/Scripts/Adam/Components/PostureController.cs b/Assets/Zion/Scripts/Adam/Components/PostureController.cs index e6b50b21..a3cdf58a 100644 --- a/Assets/Zion/Scripts/Adam/Components/PostureController.cs +++ b/Assets/Zion/Scripts/Adam/Components/PostureController.cs @@ -16,21 +16,99 @@ public class PostureController : MonoBehaviour public RawImage blueShowImage; private DroneViewDisplay droneViewDisplay; + public Button upBtn; + public Button downBtn; + public float distance; + public bool isScale = false; + /// + /// 卫星影像 + /// + public Camera satelliteImagery; + + public Coroutine currentCoroutine; + // Start is called before the first frame update void Awake() { deviceManager = DeviceManager.Instance; droneViewDisplay = DroneViewDisplay.Instance; + upBtn.onClick.AddListener(OnUp); + downBtn.onClick.AddListener(OnDown); } // Update is called once per frame void Update() { - + if (Input.GetMouseButton(0)) + { + float mouseX = Input.GetAxis("Mouse X") * 10f * Time.deltaTime; + float mouseY = Input.GetAxis("Mouse Y") * 10f * Time.deltaTime; + satelliteImagery.transform.Translate(Vector3.down * mouseY * 60f); + satelliteImagery.transform.Translate(Vector3.left * mouseX * 60f); + } } + private void OnUp() + { + distance = satelliteImagery.orthographicSize; + distance += 100; + if (distance >= 1120) + { + distance = 1120; + currentCoroutine = null; + return; + } + + if (currentCoroutine == null) + { + isScale = true; + currentCoroutine = StartCoroutine(Merge(distance)); + } + } + + private void OnDown() + { + distance = satelliteImagery.orthographicSize; + distance -= 100; + if (distance <= 200f) + { + distance = 200f; + currentCoroutine = null; + return; + } + + if (currentCoroutine == null) + { + isScale = true; + currentCoroutine = StartCoroutine(Merge(distance)); + } + } + + private IEnumerator Merge(float targetPoint) + { + while (isScale) + { + Debug.Log("update"); + satelliteImagery.orthographicSize = Mathf.Lerp(satelliteImagery.orthographicSize, targetPoint, Time.deltaTime * 20f); + if (Mathf.Abs(targetPoint - satelliteImagery.orthographicSize) < 0.1) + { + isScale = false; + currentCoroutine = null; + } + yield return new WaitForSeconds(0.01f); + } + } + + + + + private void OnEnable() { + if (currentCoroutine != null) + { + currentCoroutine = null; + } redShowImage.transform.parent.gameObject.SetActive(false); blueShowImage.transform.parent.gameObject.SetActive(false); GetSceneInfo();