xyh1985 преди 1 година
родител
ревизия
99379ed566
променени са 1 файла, в които са добавени 6 реда и са изтрити 6 реда
  1. 6 6
      Unity/Assets/Scripts/Codes/HotfixView/Client/Demo/UI/UISetting/UISettingComponentSystem.cs

+ 6 - 6
Unity/Assets/Scripts/Codes/HotfixView/Client/Demo/UI/UISetting/UISettingComponentSystem.cs

@@ -127,11 +127,11 @@ namespace ET.Client
 
         public static async void OnGameoBgVedioSlider(this UISettingComponent self,float val)
         {
-            if (val <= 0)
+            if (val < 0)
             {
-                return;
+                val = 0;
             }
-            self.isGameBgVedio = false;
+            self.isGameBgVedio = val == 0?true:false;
             string abName = self.isGameBgVedio ? "setting_min_sound_sign" : "setting_max_sound_sign";
             await ResourcesComponentHelper.Instance.LoadSprite(self.ClientScene(), "setingatlas");
             Sprite sprite = ResourcesComponentHelper.Instance.GetSprite("setingatlas", abName);
@@ -143,11 +143,11 @@ namespace ET.Client
 
         public static async void OnGameoInVedioSlider(this UISettingComponent self, float val)
         {
-            if (val <= 0)
+            if (val < 0)
             {
-                return;
+                val = 0;
             }
-            self.isGameInVedio = false;
+            self.isGameInVedio = val == 0 ? true : false;
             string abName = self.isGameInVedio ? "setting_min_sound_sign" : "setting_max_sound_sign";
             await ResourcesComponentHelper.Instance.LoadSprite(self.ClientScene(), "setingatlas");
             Sprite sprite = ResourcesComponentHelper.Instance.GetSprite("setingatlas", abName);