Просмотр исходного кода

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

lvjincheng 4 лет назад
Родитель
Сommit
9150836903

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

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

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

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