Ver código fonte

提交一张图首页修改

wartheking 9 meses atrás
pai
commit
70fb49ace7

+ 2 - 0
Assets/AIPagedLod/Scripts/WebGL/CameraBird.cs

@@ -1,4 +1,5 @@
 using DG.Tweening;
+using System;
 using Unity.Mathematics;
 using Unity.VisualScripting;
 using UnityEngine;
@@ -6,6 +7,7 @@ using UnityEngine.EventSystems;
 
 public class CameraBird : MonoBehaviour
 {
+
     public Transform target; // 目标对象,摄像头将朝向此对象
     public float smoothSpeed = 0.125f; // 摄像头平滑移动的速度
     public float scrollSensitivity = 5f; // 鼠标滚轮的灵敏度

+ 13 - 9
Assets/AIPagedLod/Scripts/WebGL/CameraBirdSec.cs

@@ -8,6 +8,8 @@ using UnityEngine.UI;
 
 public class CameraBirdSec : MonoBehaviour
 {
+    public Action beginDrag;
+
     public Transform target; // 目标对象,摄像头将朝向此对象
     public float smoothSpeed = 0.125f; // 摄像头平滑移动的速度
     public float scrollSensitivity = 5f; // 鼠标滚轮的灵敏度
@@ -41,6 +43,7 @@ public class CameraBirdSec : MonoBehaviour
     bool onUI = false;
     void Start()
     {
+
         // 初始化当前距离为初始偏移量的距离
         currentDistance = Vector3.Distance(transform.position, target.position);
         // 确保初始距离在允许的范围内
@@ -111,19 +114,20 @@ public class CameraBirdSec : MonoBehaviour
             //this.GetComponent<DepthFog>().Height = 400000 / currentDistance;
             OnDistanceChange?.Invoke(currentDistance);
         }
-        if (Input.GetMouseButton(2))
-        {
-            rotateXAngle -= Input.GetAxis("Mouse Y") * rotateSpeed;
-            rotateXAngle = Mathf.Clamp(rotateXAngle, -36f, 36f);
-            isRotate = true;
-        }
-        else {
-            isRotate = false;
-        }
+        //if (Input.GetMouseButton(2))
+        //{
+        //    rotateXAngle -= Input.GetAxis("Mouse Y") * rotateSpeed;
+        //    rotateXAngle = Mathf.Clamp(rotateXAngle, -36f, 36f);
+        //    isRotate = true;
+        //}
+        //else {
+        //    isRotate = false;
+        //}
 
         // 鼠标左键拖拽平移摄像头
         if (Input.GetMouseButtonDown(0) && !onUI)
         {
+            beginDrag?.Invoke();
             isDragging = true;
             lastMousePosition = Input.mousePosition;
         }

+ 6 - 6
Assets/Prefabs/MiniMap.prefab

@@ -103,7 +103,7 @@ Transform:
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 1644283073}
   m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
-  m_LocalPosition: {x: 0, y: 0, z: 0}
+  m_LocalPosition: {x: 0.5, y: -6.7, z: 0}
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_ConstrainProportionsScale: 0
   m_Children:
@@ -233,7 +233,7 @@ Transform:
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 788774413769781883}
   m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
-  m_LocalPosition: {x: 0, y: 0, z: 0}
+  m_LocalPosition: {x: 0.5, y: -6.7, z: 0}
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_ConstrainProportionsScale: 0
   m_Children: []
@@ -264,7 +264,7 @@ Transform:
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 4444992682839687692}
   m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
-  m_LocalPosition: {x: 0, y: 0, z: 0}
+  m_LocalPosition: {x: 0.5, y: -6.7, z: 0}
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_ConstrainProportionsScale: 0
   m_Children: []
@@ -295,7 +295,7 @@ Transform:
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 5076499884380538670}
   m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
-  m_LocalPosition: {x: 0, y: 0, z: 0}
+  m_LocalPosition: {x: 0.5, y: -6.7, z: 0}
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_ConstrainProportionsScale: 0
   m_Children: []
@@ -326,7 +326,7 @@ Transform:
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 5608233843928584891}
   m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
-  m_LocalPosition: {x: 0, y: 0, z: 0}
+  m_LocalPosition: {x: 0.5, y: -6.7, z: 0}
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_ConstrainProportionsScale: 0
   m_Children: []
@@ -497,7 +497,7 @@ Transform:
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 8307865863041227054}
   m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
-  m_LocalPosition: {x: 0, y: 0, z: 0}
+  m_LocalPosition: {x: 0.5, y: -6.7, z: 0}
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_ConstrainProportionsScale: 0
   m_Children: []

+ 380 - 0
Assets/Prefabs/UI/RuntimePoint.prefab

@@ -1,5 +1,127 @@
 %YAML 1.1
 %TAG !u! tag:unity3d.com,2011:
+--- !u!1 &406593526210158966
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 6
+  m_Component:
+  - component: {fileID: 6373583967368211387}
+  - component: {fileID: 2344977866963614916}
+  - component: {fileID: 6527376676677556443}
+  - component: {fileID: 8700194308481281455}
+  m_Layer: 5
+  m_Name: ButtonPrefab
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 0
+--- !u!224 &6373583967368211387
+RectTransform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 406593526210158966}
+  m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
+  m_LocalPosition: {x: 0, y: 0, z: 0}
+  m_LocalScale: {x: 1, y: 1, z: 1}
+  m_ConstrainProportionsScale: 0
+  m_Children:
+  - {fileID: 7962267433962748926}
+  m_Father: {fileID: 5500973439967830541}
+  m_RootOrder: 3
+  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+  m_AnchorMin: {x: 0, y: 1}
+  m_AnchorMax: {x: 0, y: 1}
+  m_AnchoredPosition: {x: 69.33457, y: 31.859406}
+  m_SizeDelta: {x: 138.67, y: 21.2396}
+  m_Pivot: {x: 0.5, y: 0.5}
+--- !u!222 &2344977866963614916
+CanvasRenderer:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 406593526210158966}
+  m_CullTransparentMesh: 1
+--- !u!114 &6527376676677556443
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 406593526210158966}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  m_Material: {fileID: 0}
+  m_Color: {r: 1, g: 1, b: 1, a: 1}
+  m_RaycastTarget: 1
+  m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
+  m_Maskable: 1
+  m_OnCullStateChanged:
+    m_PersistentCalls:
+      m_Calls: []
+  m_Sprite: {fileID: 0}
+  m_Type: 0
+  m_PreserveAspect: 0
+  m_FillCenter: 1
+  m_FillMethod: 4
+  m_FillAmount: 1
+  m_FillClockwise: 1
+  m_FillOrigin: 0
+  m_UseSpriteMesh: 0
+  m_PixelsPerUnitMultiplier: 1
+--- !u!114 &8700194308481281455
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 406593526210158966}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  m_Navigation:
+    m_Mode: 3
+    m_WrapAround: 0
+    m_SelectOnUp: {fileID: 0}
+    m_SelectOnDown: {fileID: 0}
+    m_SelectOnLeft: {fileID: 0}
+    m_SelectOnRight: {fileID: 0}
+  m_Transition: 1
+  m_Colors:
+    m_NormalColor: {r: 1, g: 1, b: 1, a: 0}
+    m_HighlightedColor: {r: 0.26788884, g: 0.990566, b: 0.4092683, a: 1}
+    m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
+    m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
+    m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
+    m_ColorMultiplier: 1
+    m_FadeDuration: 0.1
+  m_SpriteState:
+    m_HighlightedSprite: {fileID: 0}
+    m_PressedSprite: {fileID: 0}
+    m_SelectedSprite: {fileID: 0}
+    m_DisabledSprite: {fileID: 0}
+  m_AnimationTriggers:
+    m_NormalTrigger: Normal
+    m_HighlightedTrigger: Highlighted
+    m_PressedTrigger: Pressed
+    m_SelectedTrigger: Selected
+    m_DisabledTrigger: Disabled
+  m_Interactable: 1
+  m_TargetGraphic: {fileID: 6527376676677556443}
+  m_OnClick:
+    m_PersistentCalls:
+      m_Calls: []
 --- !u!1 &1489490345929393985
 GameObject:
   m_ObjectHideFlags: 0
@@ -81,6 +203,8 @@ RectTransform:
   - {fileID: 4440589227558712183}
   - {fileID: 8128819880973751387}
   - {fileID: 8189638969690776410}
+  - {fileID: 6373583967368211387}
+  - {fileID: 8112106460005740722}
   m_Father: {fileID: 0}
   m_RootOrder: 0
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@@ -109,7 +233,19 @@ MonoBehaviour:
   m_Script: {fileID: 11500000, guid: 5788e97e9583dce469525aff37534482, type: 3}
   m_Name: 
   m_EditorClassIdentifier: 
+  childBtnNames:
+  - "\u89C6\u9891\u76D1\u63A7"
+  - "\u96E8\u91CF\u76D1\u6D4B"
+  - "\u6C34\u6587\u76D1\u6D4B"
+  - "\u6C34\u538B\u76D1\u6D4B"
+  - "\u6C34\u4F4D\u76D1\u6D4B"
+  - "\u4F4D\u79FB\u76D1\u6D4B"
+  - "\u6CF5\u7AD9"
+  - "\u95F8\u7AD9"
+  childBtnPrefab: {fileID: 8700194308481281455}
   btn: {fileID: 7400851106940013810}
+  listBtns: []
+  childBtnParent: {fileID: 8112106460005740722}
   text: {fileID: 7010783671127523822}
   icon: {fileID: 2538998181460178410}
   staticImp: {fileID: 0}
@@ -117,6 +253,7 @@ MonoBehaviour:
   arrow: {fileID: 0}
   bingObj: {fileID: 0}
   lastTime: 0
+  addContent: {fileID: 8112106460005740722}
 --- !u!114 &2238104553685385063
 MonoBehaviour:
   m_ObjectHideFlags: 0
@@ -191,6 +328,86 @@ MonoBehaviour:
   m_OnClick:
     m_PersistentCalls:
       m_Calls: []
+--- !u!1 &3797303029413524337
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 6
+  m_Component:
+  - component: {fileID: 7962267433962748926}
+  - component: {fileID: 4163181313726940586}
+  - component: {fileID: 9192365632635621009}
+  m_Layer: 5
+  m_Name: Text (Legacy)
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 1
+--- !u!224 &7962267433962748926
+RectTransform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 3797303029413524337}
+  m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
+  m_LocalPosition: {x: 0, y: 0, z: 0}
+  m_LocalScale: {x: 1, y: 1, z: 1}
+  m_ConstrainProportionsScale: 0
+  m_Children: []
+  m_Father: {fileID: 6373583967368211387}
+  m_RootOrder: 0
+  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+  m_AnchorMin: {x: 0, y: 0}
+  m_AnchorMax: {x: 1, y: 1}
+  m_AnchoredPosition: {x: 0.000061035156, y: 0}
+  m_SizeDelta: {x: 0, y: 0}
+  m_Pivot: {x: 0.5, y: 0.5}
+--- !u!222 &4163181313726940586
+CanvasRenderer:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 3797303029413524337}
+  m_CullTransparentMesh: 1
+--- !u!114 &9192365632635621009
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 3797303029413524337}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  m_Material: {fileID: 0}
+  m_Color: {r: 1, g: 1, b: 1, a: 1}
+  m_RaycastTarget: 1
+  m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
+  m_Maskable: 1
+  m_OnCullStateChanged:
+    m_PersistentCalls:
+      m_Calls: []
+  m_FontData:
+    m_Font: {fileID: 12800000, guid: 85c13d115126ca04ca985ec0156f4c61, type: 3}
+    m_FontSize: 12
+    m_FontStyle: 0
+    m_BestFit: 0
+    m_MinSize: 1
+    m_MaxSize: 40
+    m_Alignment: 4
+    m_AlignByGeometry: 0
+    m_RichText: 1
+    m_HorizontalOverflow: 0
+    m_VerticalOverflow: 0
+    m_LineSpacing: 1
+  m_Text: "\u95F8\u7AD9"
 --- !u!1 &4884575910827390704
 GameObject:
   m_ObjectHideFlags: 0
@@ -392,6 +609,169 @@ MonoBehaviour:
     m_VerticalOverflow: 0
     m_LineSpacing: 1
   m_Text: "\u5167\u8346\u6CB3\u95F8"
+--- !u!1 &6371530826547427393
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 6
+  m_Component:
+  - component: {fileID: 8112106460005740722}
+  - component: {fileID: 7360078027882583284}
+  - component: {fileID: 7408682494322404351}
+  - component: {fileID: 8322852804089110860}
+  - component: {fileID: 2018816149245339635}
+  - component: {fileID: 2652886371346795838}
+  m_Layer: 5
+  m_Name: Add
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 1
+--- !u!224 &8112106460005740722
+RectTransform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 6371530826547427393}
+  m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+  m_LocalPosition: {x: 0, y: 0, z: 0}
+  m_LocalScale: {x: 1, y: 1, z: 1}
+  m_ConstrainProportionsScale: 0
+  m_Children: []
+  m_Father: {fileID: 5500973439967830541}
+  m_RootOrder: 4
+  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: -0.0010824, y: 9.999975}
+  m_SizeDelta: {x: 138.67, y: 0}
+  m_Pivot: {x: 0.5, y: 0}
+--- !u!114 &7360078027882583284
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 6371530826547427393}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  m_Navigation:
+    m_Mode: 3
+    m_WrapAround: 0
+    m_SelectOnUp: {fileID: 0}
+    m_SelectOnDown: {fileID: 0}
+    m_SelectOnLeft: {fileID: 0}
+    m_SelectOnRight: {fileID: 0}
+  m_Transition: 1
+  m_Colors:
+    m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
+    m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 0}
+    m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
+    m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
+    m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
+    m_ColorMultiplier: 1
+    m_FadeDuration: 0.1
+  m_SpriteState:
+    m_HighlightedSprite: {fileID: 0}
+    m_PressedSprite: {fileID: 0}
+    m_SelectedSprite: {fileID: 0}
+    m_DisabledSprite: {fileID: 0}
+  m_AnimationTriggers:
+    m_NormalTrigger: Normal
+    m_HighlightedTrigger: Highlighted
+    m_PressedTrigger: Pressed
+    m_SelectedTrigger: Selected
+    m_DisabledTrigger: Disabled
+  m_Interactable: 1
+  m_TargetGraphic: {fileID: 8322852804089110860}
+  m_OnClick:
+    m_PersistentCalls:
+      m_Calls: []
+--- !u!222 &7408682494322404351
+CanvasRenderer:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 6371530826547427393}
+  m_CullTransparentMesh: 1
+--- !u!114 &8322852804089110860
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 6371530826547427393}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  m_Material: {fileID: 0}
+  m_Color: {r: 0.36477983, g: 0.83235186, b: 1, a: 1}
+  m_RaycastTarget: 1
+  m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
+  m_Maskable: 1
+  m_OnCullStateChanged:
+    m_PersistentCalls:
+      m_Calls: []
+  m_Sprite: {fileID: 0}
+  m_Type: 0
+  m_PreserveAspect: 0
+  m_FillCenter: 1
+  m_FillMethod: 4
+  m_FillAmount: 1
+  m_FillClockwise: 1
+  m_FillOrigin: 0
+  m_UseSpriteMesh: 0
+  m_PixelsPerUnitMultiplier: 1
+--- !u!114 &2018816149245339635
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 6371530826547427393}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  m_Padding:
+    m_Left: 0
+    m_Right: 0
+    m_Top: 0
+    m_Bottom: 0
+  m_ChildAlignment: 0
+  m_Spacing: 0
+  m_ChildForceExpandWidth: 1
+  m_ChildForceExpandHeight: 0
+  m_ChildControlWidth: 0
+  m_ChildControlHeight: 0
+  m_ChildScaleWidth: 0
+  m_ChildScaleHeight: 0
+  m_ReverseArrangement: 1
+--- !u!114 &2652886371346795838
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 6371530826547427393}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  m_HorizontalFit: 0
+  m_VerticalFit: 2
 --- !u!1 &6989383943229996949
 GameObject:
   m_ObjectHideFlags: 0

Diferenças do arquivo suprimidas por serem muito extensas
+ 155 - 2
Assets/Scene 1.unity


+ 9 - 2
Assets/Scripts/StaticLod.cs

@@ -1,6 +1,7 @@
 using Newtonsoft.Json;
 using System.Collections;
 using System.Collections.Generic;
+using Unity.Mathematics;
 using Unity.VisualScripting;
 using UnityEngine;
 
@@ -33,8 +34,14 @@ public class StaticLod : MonoBehaviour
     }
 
     public void OnFoucusStatic(int i) {
-        currentStatic = staticImportants[i];
-        Debug.Log("11111111111111111:" + currentStatic);
+        if (i < 0)
+        {
+            currentStatic = staticImportants[staticImportants.Count - math.abs(i)];
+        }
+        else {
+            currentStatic = staticImportants[i];
+        }
+        
         currentStatic.ForceSacnMode();
     }
 

+ 2 - 2
Assets/Scripts/UI/UIView/FHSS/FHSSLayer.cs

@@ -38,7 +38,7 @@ public class FHSSLayer : YZTRootLayer
 
     private void OnEnable()
     {
-        StaticLod.instance.OnFoucusStatic(0);
-        StaticLod.instance.currentStatic.SetCameraToCenter(new Vector3(513.8401f, 20, 4938.701f), 21389, new Vector2(89.61806f, 85.64014f));
+        StaticLod.instance.OnFoucusStatic(-1);
+        //StaticLod.instance.currentStatic.SetCameraToCenter(new Vector3(513.8401f, 20, 4938.701f), 21389, new Vector2(89.61806f, 85.64014f));
     }
 }

+ 57 - 2
Assets/Scripts/UI/UIView/YZT/RuntimePoint.cs

@@ -6,10 +6,30 @@ using UnityEngine;
 using UnityEngine.EventSystems;
 using UnityEngine.UI;
 
-public class RuntimePoint : MonoBehaviour,IPointerDownHandler,IPointerUpHandler
+
+public class RuntimePoint : MonoBehaviour, IPointerDownHandler, IPointerUpHandler
 {
+    public string[] childBtnNames = new string[] {
+        "视频监控",
+        "雨量监测",
+        "水文监测",
+        "水压监测",
+        "水位监测",
+        "位移监测",
+        "泵站",
+        "闸站"
+    };
+
+    public Action<int, RuntimePoint> onChildClick;
+
+    public Button childBtnPrefab;
+
     public Button btn;
 
+    public List<Button> listBtns = new List<Button>();
+
+    public RectTransform childBtnParent;
+
     public Text text;
     public Image icon;
 
@@ -24,6 +44,8 @@ public class RuntimePoint : MonoBehaviour,IPointerDownHandler,IPointerUpHandler
     public Action onPointClick;
 
     public float lastTime;
+
+    public RectTransform addContent;
     void Awake() {
        
       //  arrow.DOLocalMoveY(-40, 1.0f).SetLoops(-1, LoopType.Yoyo);
@@ -31,7 +53,37 @@ public class RuntimePoint : MonoBehaviour,IPointerDownHandler,IPointerUpHandler
     // Start is called before the first frame update
     void Start()
     {
-        
+        this.GetComponent<Button>().onClick.AddListener(() =>
+        {
+            if (layerIDs.Count > 1)
+            {
+                addContent.gameObject.SetActive(true);
+                if (listBtns.Count < 1)
+                {
+                    for (int i = 0; i < layerIDs.Count; i++)
+                    {
+                        Button button = Instantiate(childBtnPrefab);
+                        button.GetComponent<RectTransform>().SetParent(childBtnParent);
+                        int temp = i;
+                        button.GetComponentInChildren<Text>().text = childBtnNames[layerIDs[i]];
+                        button.transform.localScale = Vector3.one;
+                        button.gameObject.SetActive(true);
+                        
+                        button.onClick.AddListener(() =>
+                        {
+                            onChildClick?.Invoke(layerIDs[temp],this);
+                            Debug.Log(layerIDs[temp]);
+                            addContent.gameObject.SetActive(false);
+                        });
+                        listBtns.Add(button);
+                    }
+                }
+            }
+            CameraManager.instance.secondCamera.GetComponent<CameraBirdSec>().beginDrag += () =>
+            {
+                addContent.gameObject.SetActive(false);
+            };
+        });
     }
     public void Refresh(Sprite newIcon) {
         Debug.Log(newIcon);
@@ -70,4 +122,7 @@ public class RuntimePoint : MonoBehaviour,IPointerDownHandler,IPointerUpHandler
        
     }
 
+    
+
+   
 }

+ 27 - 3
Assets/Scripts/UI/UIView/YZT/YZTLayer.cs

@@ -314,6 +314,7 @@ public class YZTLayer : YZTRootLayer
             newPoint.bingObj.transform.localPosition = tempLocalPosition;
             newPoint.bingObj.name = temp.name;
 
+            newPoint.onChildClick += OnChooseNewPointClick;
 
             newPoint.onPointClick = () =>
             {
@@ -323,6 +324,32 @@ public class YZTLayer : YZTRootLayer
         }
     }
 
+    void OnChooseNewPointClick(int selectIndex, RuntimePoint newPoint) {
+        if (selectIndex == 0 || selectIndex == 3 || selectIndex == 5)
+        {
+            OnePicNav.instance.OnButtnClick(2);
+        }
+        else if (selectIndex == 1 || selectIndex == 2)
+        {
+            OnePicNav.instance.SwitchToGlobalWeather();
+        }
+        else if (selectIndex == 4)
+        {
+            OnePicNav.instance.SwitchToGlobalWaterHeight();
+        }
+        else if (selectIndex >= 6)
+        {
+            CameraManager.SwitchCamera(0);
+            viewMode = ViewMode.normal;
+            StaticLod.instance.OnFoucusStatic(newPoint.staticImp);
+            yZT.gameObject.SetActive(true);
+            int index = FindIndexByLayerUnitName(newPoint.bingObj.gameObject.name);
+            ChangeRightContent(index);
+            middleContent.gameObject.SetActive(false);
+            rightContent.gameObject.SetActive(false);
+            LeftBtnClick(1, false);
+        }
+    }
 
     int FindIndexByLayerUnitName(string name) {
         for (int i = 0; i < GlobalData.layerUnitDatas.Count; i++) {
@@ -338,9 +365,6 @@ public class YZTLayer : YZTRootLayer
         {
             OnNewPointClick(temp, newPoint);
         }
-        else { 
-        
-        }
     }
 
     void OnNewPointClick(HotPointData temp, RuntimePoint newPoint)

Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff