Browse Source

水位淹没调整,防洪形势修改

Void_F 9 months ago
parent
commit
6cca040438

+ 53 - 2
Assets/Art/Prefab/Effect/JinHongFenQu.prefab

@@ -15,7 +15,7 @@ GameObject:
   m_Icon: {fileID: 0}
   m_NavMeshLayer: 0
   m_StaticEditorFlags: 0
-  m_IsActive: 1
+  m_IsActive: 0
 --- !u!4 &4961563033811451659
 Transform:
   m_ObjectHideFlags: 0
@@ -50,7 +50,7 @@ GameObject:
   m_Icon: {fileID: 0}
   m_NavMeshLayer: 0
   m_StaticEditorFlags: 0
-  m_IsActive: 1
+  m_IsActive: 0
 --- !u!4 &5959140516932723843
 Transform:
   m_ObjectHideFlags: 0
@@ -374,6 +374,57 @@ MonoBehaviour:
     m_PreInfinity: 2
     m_PostInfinity: 2
     m_RotationOrder: 4
+  waterCurve_70000:
+    serializedVersion: 2
+    m_Curve:
+    - serializedVersion: 3
+      time: 0
+      value: 0.9
+      inSlope: -1.3839998
+      outSlope: -1.3839998
+      tangentMode: 34
+      weightedMode: 0
+      inWeight: 0
+      outWeight: 0.33333334
+    - serializedVersion: 3
+      time: 0.25
+      value: 0.554
+      inSlope: -1.3839998
+      outSlope: -1.756
+      tangentMode: 69
+      weightedMode: 0
+      inWeight: 0.33333334
+      outWeight: 0.33333334
+    - serializedVersion: 3
+      time: 0.5
+      value: 0.115
+      inSlope: -1.756
+      outSlope: -0.26
+      tangentMode: 69
+      weightedMode: 0
+      inWeight: 0.33333334
+      outWeight: 0.33333334
+    - serializedVersion: 3
+      time: 0.75
+      value: 0.05
+      inSlope: -0.26
+      outSlope: -0.2
+      tangentMode: 69
+      weightedMode: 0
+      inWeight: 0.33333334
+      outWeight: 0.33333334
+    - serializedVersion: 3
+      time: 1
+      value: 0
+      inSlope: -0.2
+      outSlope: -0.2
+      tangentMode: 34
+      weightedMode: 0
+      inWeight: 0.33333334
+      outWeight: 0
+    m_PreInfinity: 2
+    m_PostInfinity: 2
+    m_RotationOrder: 4
 --- !u!1 &6141318737994756229
 GameObject:
   m_ObjectHideFlags: 0

File diff suppressed because it is too large
+ 1 - 110
Assets/Scene 1.unity


+ 3 - 3
Assets/Scripts/StaticImportant.cs

@@ -187,9 +187,11 @@ public class StaticImportant : MonoBehaviour
         }
     }
 
-    public void SetCameraToCenter(Vector3 centerPos, float distance)
+    public void SetCameraToCenter(Vector3 centerPos, float distance,Vector2 rota)
     {
         targetDistance = distance;
+        rotateXAngle = rota.x;
+        rotateYAngle = rota.y;
         CameraBird birdCamera = CameraManager.instance.mainCamera.GetComponent<CameraBird>();
         if (birdCamera != null)
         {
@@ -199,8 +201,6 @@ public class StaticImportant : MonoBehaviour
             {
                 fader.material.DOColor(Color.clear, 1.5f).onComplete = () => { fader.gameObject.SetActive(false); };
             };
-
-
             birdCamera.target.localPosition = centerPos;
             Debug.Log(birdCamera.target.position);
             birdCamera.currentDistance = targetDistance;

+ 6 - 0
Assets/Scripts/UI/UIView/FHSS/FHSSLayer.cs

@@ -35,4 +35,10 @@ public class FHSSLayer : YZTRootLayer
             zhengChangShuiWeiText.text = $"{shuiWeiZhuangKuangData.zhengChangShuiWei}个";
         }
     }
+
+    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));
+    }
 }

+ 3 - 2
Assets/WaterRangeCtrlTool.cs

@@ -13,6 +13,7 @@ public class WaterRangeCtrlTool : MonoBehaviour
     public AnimationCurve waterCurveVZ;
 
     public AnimationCurve waterCurve_65000;
+    public AnimationCurve waterCurve_70000;
 
     public int waterCurveIndex
     {
@@ -38,7 +39,7 @@ public class WaterRangeCtrlTool : MonoBehaviour
     {
         if (reSetValue)
         {
-            SetRangeValue(1);
+            SetRangeValue(0);
         }
         for (int i = 0; i < FxObjects.Length; i++)
         {
@@ -62,7 +63,7 @@ public class WaterRangeCtrlTool : MonoBehaviour
                 rangeValue  = waterCurve_65000.Evaluate(value);
                 break;
             case 1 :
-                rangeValue  = waterCurve_65000.Evaluate(value);
+                rangeValue  = waterCurve_70000.Evaluate(value);
                 break;
         }
         waterRangeMat.SetFloat("_ClipLength",rangeValue);

+ 30 - 4
Assets/WaterRangeCtrl_UI.cs

@@ -9,20 +9,46 @@ public class WaterRangeCtrl_UI : MonoBehaviour
     public Slider rangeSlider;
     public Button ShuiweiButton_1;
     public Button ShuiweiButton_2;
-    
+    private CanvasGroup button_CG1;
+    private CanvasGroup button_CG2;
     private void Awake()
     {
         rangeSlider = this.transform.Find("WaterRangeSilder").GetComponent<Slider>();
         ShuiweiButton_1 = this.transform.Find("Shuiwei_1_Button").GetComponent<Button>();
+        button_CG1 = ShuiweiButton_1.GetComponent<CanvasGroup>();
         ShuiweiButton_2 = this.transform.Find("Shuiwei_2_Button").GetComponent<Button>();
-        
+        button_CG2 = ShuiweiButton_2.GetComponent<CanvasGroup>();
+
         rangeSlider.onValueChanged.AddListener((sliderValue)=>WaterRangeCtrlTool._Instance.SetRangeValue(sliderValue));
-        ShuiweiButton_1.onClick.AddListener(()=>WaterRangeCtrlTool._Instance.ChangeWaterCurve(0));
-        ShuiweiButton_2.onClick.AddListener(()=>WaterRangeCtrlTool._Instance.ChangeWaterCurve(1));
+        ShuiweiButton_1.onClick.AddListener(()=>
+        {
+            WaterRangeCtrlTool._Instance.ChangeWaterCurve(0);
+            button_CG1.alpha = 1;
+            button_CG2.alpha = 0.2f;
+            rangeSlider.value = 0;
+            WaterRangeCtrlTool._Instance.ShowFx(true);
+        });
+        ShuiweiButton_2.onClick.AddListener(()=>
+        {
+            WaterRangeCtrlTool._Instance.ChangeWaterCurve(1);
+            button_CG1.alpha = 0.2f;
+            button_CG2.alpha = 1;
+            rangeSlider.value = 0;
+            WaterRangeCtrlTool._Instance.ShowFx(true);
+        });
     }
 
     private void OnEnable()
     {
+        button_CG1.alpha = 1;
+        button_CG2.alpha = 0.2f;
+        WaterRangeCtrlTool._Instance.ChangeWaterCurve(0);
         rangeSlider.value = 0;
+        WaterRangeCtrlTool._Instance.ShowFx(true);
+    }
+
+    private void OnDisable()
+    {
+        WaterRangeCtrlTool._Instance.HideFx();
     }
 }

Some files were not shown because too many files changed in this diff