wartheking 2 өдөр өмнө
parent
commit
aa1992429f

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 122 - 0
Assets/Scene 1.unity


+ 12 - 0
Assets/Scripts/StaticImportant.cs

@@ -36,6 +36,8 @@ public class StaticImportant : MonoBehaviour
     public bool waitCreatModels = false;
     public string model_ab_Name;
 
+    public GameObject focusShowObj;
+
     bool onShow = true;
 
     public ModelAniTool _ModelAni;
@@ -108,8 +110,18 @@ public class StaticImportant : MonoBehaviour
         }
     }
 
+    public void ReleaseSacnMode() {
+        if (focusShowObj != null)
+        {
+            focusShowObj.SetActive(false);
+        }
+    }
+
     public void ForceSacnMode()
     {
+        if (focusShowObj != null) { 
+            focusShowObj.SetActive(true);
+        }
         gameObject.SetActive(true);
         SetCameraToCenter();
     }

+ 6 - 0
Assets/Scripts/StaticLod.cs

@@ -43,6 +43,8 @@ public class StaticLod : MonoBehaviour
     }
 
     public void OnFoucusStatic(int i) {
+        if (currentStatic != null)
+            currentStatic.ReleaseSacnMode();
         if (i < 0)
         {
             currentStatic = staticImportants[staticImportants.Count - math.abs(i)];
@@ -56,6 +58,8 @@ public class StaticLod : MonoBehaviour
 
     public int OnFoucusStatic(StaticImportant si)
     {
+        if (currentStatic != null)
+            currentStatic.ReleaseSacnMode();
         currentStatic = si;
         currentStatic.ForceSacnMode();
         return staticImportants.IndexOf(si);
@@ -63,6 +67,8 @@ public class StaticLod : MonoBehaviour
 
     public void OnFoucusStatic(string name_pri)
     {
+        if (currentStatic != null)
+            currentStatic.ReleaseSacnMode();
         currentStatic = staticImportantsDic[name_pri];
         currentStatic.ForceSacnMode();
     }

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно