فهرست منبع

修复电池Label的bug,开启设备连接检测界面。

lvjincheng 4 سال پیش
والد
کامیت
9150836903
2فایلهای تغییر یافته به همراه2 افزوده شده و 5 حذف شده
  1. 1 1
      Assets/BowArrow/Scripts/View/DeviceBatteryView.cs
  2. 1 4
      Assets/BowArrow/Scripts/View/DeviceReconnectView.cs

+ 1 - 1
Assets/BowArrow/Scripts/View/DeviceBatteryView.cs

@@ -70,8 +70,8 @@ public class DeviceBatteryView : MonoBehaviour
         if (value == 0) active = false;
         if (value == 0) active = false;
         Image img = this.transform.Find($"Layout/Frame{deviceID}/Bar").GetComponent<Image>();
         Image img = this.transform.Find($"Layout/Frame{deviceID}/Bar").GetComponent<Image>();
         Text txt =this.transform.Find($"Layout/Frame{deviceID}/Value").GetComponent<Text>();
         Text txt =this.transform.Find($"Layout/Frame{deviceID}/Value").GetComponent<Text>();
+        this.transform.Find($"Layout/Label{deviceID}").gameObject.SetActive(active);
         img.transform.parent.gameObject.SetActive(active);
         img.transform.parent.gameObject.SetActive(active);
-        txt.transform.parent.gameObject.SetActive(active);
         img.fillAmount = value / 100f;
         img.fillAmount = value / 100f;
         txt.text = ((int) value) + "%";
         txt.text = ((int) value) + "%";
     }
     }

+ 1 - 4
Assets/BowArrow/Scripts/View/DeviceReconnectView.cs

@@ -39,10 +39,7 @@ public class DeviceReconnectView : MonoBehaviour
         GameMgr.ins.addLockerForGamePause(this);
         GameMgr.ins.addLockerForGamePause(this);
 
 
         //用于测试阶段,暂时屏蔽该页面
         //用于测试阶段,暂时屏蔽该页面
-        // Destroy(this.gameObject);
-        // if (onComplete != null) {
-        //     onComplete();   
-        // }
+        // Destroy(this.gameObject); if (onComplete != null) onComplete();
     }
     }
 
 
     void OnDestroy()
     void OnDestroy()