Prechádzať zdrojové kódy

提交runtimepoint变得好用

wartheking 9 mesiacov pred
rodič
commit
a61d0bdd73

+ 3 - 1
Assets/AIPagedLod/Scripts/WebGL/CameraBirdSec.cs

@@ -81,10 +81,12 @@ public class CameraBirdSec : MonoBehaviour
         bool specialUI = false;
         if (GetPointerOverUIElement(out GameObject uiElement))
         {
+            
             // 获取 UI 元素的类型
             if (uiElement.TryGetComponent<Button>(out Button button))
             {
-                if (uiElement.transform.parent.TryGetComponent<RuntimePoint>(out RuntimePoint rp)) {
+                
+                if (uiElement.transform.TryGetComponent<RuntimePoint>(out RuntimePoint rp)) {
                     specialUI = true;
                 }
             }

+ 1 - 1
Assets/MapLodCtrl.cs

@@ -16,7 +16,7 @@ public class MapLodCtrl : MonoBehaviour
 
     private void Start()
     {
-        //MapList[currentMapIndex].map.ShowMap();
+        MapList[currentMapIndex].map.ShowMap();
     }
 
     private void OnDestroy()

+ 46 - 1
Assets/Prefabs/UI/RuntimePoint.prefab

@@ -58,6 +58,7 @@ GameObject:
   - component: {fileID: 2742062590507750192}
   - component: {fileID: -6917283281914006372}
   - component: {fileID: 2238104553685385063}
+  - component: {fileID: -358605054987661017}
   m_Layer: 5
   m_Name: RuntimePoint
   m_TagString: Untagged
@@ -129,7 +130,7 @@ MonoBehaviour:
   m_Name: 
   m_EditorClassIdentifier: 
   m_Material: {fileID: 0}
-  m_Color: {r: 1, g: 1, b: 1, a: 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
@@ -146,6 +147,50 @@ MonoBehaviour:
   m_FillOrigin: 0
   m_UseSpriteMesh: 0
   m_PixelsPerUnitMultiplier: 1
+--- !u!114 &-358605054987661017
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 3276763291743061506}
+  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.36477983, g: 0.83235186, b: 1, 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: 0}
+    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: 2238104553685385063}
+  m_OnClick:
+    m_PersistentCalls:
+      m_Calls: []
 --- !u!1 &4884575910827390704
 GameObject:
   m_ObjectHideFlags: 0