|
@@ -84,7 +84,7 @@ namespace SC.XR.Unity.Module_DetectorSystem
|
|
|
|
|
|
|
|
|
#region Deveice status
|
|
|
-#if UNITY_EDITOR
|
|
|
+
|
|
|
public int Head_Battery => SCBatteryDetector.getInstance.Head_Battery;
|
|
|
bool Head_ChargingState => SCBatteryDetector.getInstance.Head_ChargingState;
|
|
|
|
|
@@ -109,31 +109,6 @@ namespace SC.XR.Unity.Module_DetectorSystem
|
|
|
return handler_right_C;
|
|
|
}
|
|
|
}
|
|
|
-#elif UNITY_ANDROID
|
|
|
- public int Head_Battery => API_Module_BatteryStatus.BatteryLevel;
|
|
|
- bool Head_ChargingState => API_Module_BatteryStatus.IsCharging == BATTERYSTATUS.BATTERY_STATUS_CHARGING;
|
|
|
-
|
|
|
- bool Handler_Left_ConState
|
|
|
- {
|
|
|
- get
|
|
|
- {
|
|
|
- handler_left_C = GSXR_Get_ControllerisVaild(GCType.Left) || GSXR_Is_Connected(GCType.Left);
|
|
|
- if (!handler_left_C)
|
|
|
- L_firstOut = false;
|
|
|
- return handler_left_C;
|
|
|
- }
|
|
|
- }
|
|
|
- bool Handler_Right_ConState
|
|
|
- {
|
|
|
- get
|
|
|
- {
|
|
|
- handler_right_C = GSXR_Get_ControllerisVaild(GCType.Right) || GSXR_Is_Connected(GCType.Right);
|
|
|
- if (!handler_right_C)
|
|
|
- R_firstOut = false;
|
|
|
- return handler_right_C;
|
|
|
- }
|
|
|
- }
|
|
|
-#endif
|
|
|
bool handler_right_C = false;
|
|
|
bool handler_left_C = false;
|
|
|
|
|
@@ -174,13 +149,10 @@ namespace SC.XR.Unity.Module_DetectorSystem
|
|
|
|
|
|
|
|
|
int UnderBattery = 15;
|
|
|
-#if UNITY_EDITOR
|
|
|
+
|
|
|
int Handler_Left_Battery => SCBatteryDetector.getInstance.Handler_Left_Battery;
|
|
|
int Handler_Right_Battery => SCBatteryDetector.getInstance.Handler_Right_Battery;
|
|
|
-#elif UNITY_ANDROID
|
|
|
- int Handler_Left_Battery => BatteryLevelToPercentage(GCType.Left);
|
|
|
- int Handler_Right_Battery => BatteryLevelToPercentage(GCType.Right);
|
|
|
-#endif
|
|
|
+
|
|
|
HandlerFullBatteryLevelConfig _batteryConfigs;
|
|
|
HandlerFullBatteryLevelConfig BatteryConfigs
|
|
|
{
|