Explorar o código

提交隔提高亮

wartheking hai 3 semanas
pai
achega
7ca825add0

+ 2 - 2
Assets/Art/Material/Buildings/Terrain/HeTi_GaoGuang.mat

@@ -83,6 +83,6 @@ Material:
     - _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
     - _MainCol: {r: 0.1462264, g: 0.28684825, b: 1, a: 0.39215687}
     - _MainCol2: {r: 3.262192, g: 4.7874217, b: 7.129739, a: 1}
-    - _OffsetSpeed: {r: 0.5, g: 1, b: 0, a: 0}
-    - _OffsetSpeed2: {r: 0.5, g: 1, b: 0, a: 0}
+    - _OffsetSpeed: {r: -0.5, g: 1, b: 0, a: 0}
+    - _OffsetSpeed2: {r: -0.5, g: 1, b: 0, a: 0}
   m_BuildTextureStacks: []

+ 5 - 0
Assets/Prefabs/UI/Item0.prefab

@@ -137,6 +137,11 @@ MonoBehaviour:
   nameText: {fileID: 2155801003145367754}
   staticImp: {fileID: 0}
   bingObj: {fileID: 0}
+  images:
+  - {fileID: 21300000, guid: 789c3b795df4fd444a61f54278f5e2ec, type: 3}
+  - {fileID: 21300000, guid: e85de0e72e3d91d45b19bc164d147b49, type: 3}
+  - {fileID: 21300000, guid: 739e5508daecc0c4ca1d9aa79b9b9e2b, type: 3}
+  - {fileID: 21300000, guid: cc0b7462632e25348bc7c20ddc2ae8f9, type: 3}
 --- !u!1 &2155801003145367756
 GameObject:
   m_ObjectHideFlags: 0

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 97 - 0
Assets/Scene 1.unity


+ 13 - 0
Assets/Scripts/StaticLod.cs

@@ -17,6 +17,8 @@ public class StaticLod : MonoBehaviour
 
     public StaticImportant currentStatic;
 
+    public GameObject hetiGaoLiang;
+
     float interVal = 0;
     // Start is called before the first frame update
     void Awake()
@@ -85,6 +87,17 @@ public class StaticLod : MonoBehaviour
                         staticImportants[i].Hide();
                     }
                 }
+
+                if (hetiGaoLiang != null) {
+                    if (CameraManager.instance.mainCamera.transform.position.y > 3000)
+                    {
+                        hetiGaoLiang.gameObject.SetActive(true);
+                    }
+                    else{
+                        hetiGaoLiang.gameObject.SetActive(false);
+
+                    }
+                }
             }
         }
         else {

+ 30 - 5
Assets/Scripts/UI/UIView/YZT/Item0.cs

@@ -19,19 +19,41 @@ public class Item0 : MonoBehaviour, IPointerDownHandler, IPointerUpHandler
     public StaticImportant staticImp;
 
     public GameObject bingObj;
+
+    public Sprite[] images;
     // Start is called before the first frame update
     void Start()
     {
-        
+
     }
 
-    public void InitPoint(Sprite newIcon, string name_pri, string newText,string special)
+    public void InitPoint(Sprite newIcon, string name_pri, string newText, string special)
     {
-        if (special != "1") {
+        if (special != "1")
+        {
             bg.gameObject.SetActive(false);
             this.GetComponentInChildren<Button>().targetGraphic = nameText;
             this.GetComponent<RectTransform>().sizeDelta = new Vector2(this.GetComponent<RectTransform>().sizeDelta.x, 70);
         }
+        else
+        {
+            switch (name_pri)
+            {
+                case "BuYuan":
+                    pic.GetComponent<Image>().sprite = images[0];
+                    break;
+                case "TaoKou":
+                    pic.GetComponent<Image>().sprite = images[1];
+                    break;
+                case "YaoKou":
+                    pic.GetComponent<Image>().sprite = images[2];
+                    break;
+                case "GeTi":
+                    pic.GetComponent<Image>().sprite = images[3];
+                    break;
+            }
+
+        }
         nameText.text = newText;
         if (name_pri.Trim().Length > 0)
         {
@@ -47,9 +69,12 @@ public class Item0 : MonoBehaviour, IPointerDownHandler, IPointerUpHandler
         if (CameraManager.instance.mainCamera.GetComponent<CameraBird>().onScroll)
         {
             pic.GetComponent<Image>().raycastTarget = false;
+            nameText.raycastTarget = false;
         }
-        else {
+        else
+        {
             pic.GetComponent<Image>().raycastTarget = true;
+            nameText.raycastTarget = true;
         }
         this.GetComponent<RectTransform>().anchoredPosition = CameraManager.instance.mainCamera.WorldToScreenPoint(bingObj.transform.position) * 1920.0f / Screen.width;
 
@@ -64,7 +89,7 @@ public class Item0 : MonoBehaviour, IPointerDownHandler, IPointerUpHandler
         if (eventData.button == PointerEventData.InputButton.Left)
         {
             lastTime = Time.time;
-            
+
         }
     }
 

+ 10 - 0
Assets/Scripts/UI/UIView/YZT/YZTLayer.cs

@@ -12,6 +12,8 @@ using UnityAsync;
 using WaitUntil = UnityAsync.WaitUntil;
 using DG.Tweening;
 using Unity.VisualScripting;
+using static UnityEditor.Progress;
+using System.Reflection;
 
 [System.Serializable]
 public class YZTLayerData
@@ -694,6 +696,14 @@ public class YZTLayer : YZTRootLayer
                 };
             }
 
+            Item0 item1 = Instantiate(item0Prefab, Vector3.zero, Quaternion.identity);
+            item1.GetComponent<RectTransform>().SetParent(item0Parent.transform);
+            item1.InitPoint(hotPointSprite[7], "GeTi", "隔提", "1");
+            //item1.onPointClick = () =>
+            //{
+            //    OnNewPointClick(temp, item1);
+            //};
+
             newPoint.onPointClick = () =>
             {
                 OnNewPointClick(temp, newPoint);

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio