养成基本完毕,新UI,修bug,装备初步,
This commit is contained in:
@@ -43,7 +43,7 @@ public class uBehaviourRaderController : MonoBehaviour
|
||||
public float normalizedSpreadPenalty = 0.30f;
|
||||
|
||||
private Coroutine loadRoutine;
|
||||
private bool settingsSubscribed;
|
||||
private bool overlaySubscribed;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
@@ -52,7 +52,8 @@ public class uBehaviourRaderController : MonoBehaviour
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
BindSettingsVisibility();
|
||||
BindOverlayVisibility();
|
||||
ApplyOverlayVisibility(btmandtopController.CurrentOverlayPanelsVisible);
|
||||
if (reloadOnEnable && Application.isPlaying)
|
||||
{
|
||||
BeginLoad();
|
||||
@@ -61,7 +62,7 @@ public class uBehaviourRaderController : MonoBehaviour
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
UnsubscribeSettingsVisibility();
|
||||
UnsubscribeOverlayVisibility();
|
||||
if (loadRoutine != null)
|
||||
{
|
||||
StopCoroutine(loadRoutine);
|
||||
@@ -100,7 +101,7 @@ public class uBehaviourRaderController : MonoBehaviour
|
||||
chartBridge != null &&
|
||||
chartBridge.Profile != null)
|
||||
{
|
||||
ApplySettingsVisibility(btmandtopController.CurrentSettingsVisible);
|
||||
ApplyOverlayVisibility(btmandtopController.CurrentOverlayPanelsVisible);
|
||||
ApplySummary(BuildSummary(RecentPlayHistoryStore.GetRecords()));
|
||||
loadRoutine = null;
|
||||
yield break;
|
||||
@@ -153,35 +154,35 @@ public class uBehaviourRaderController : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
private void BindSettingsVisibility()
|
||||
private void BindOverlayVisibility()
|
||||
{
|
||||
if (settingsSubscribed)
|
||||
if (overlaySubscribed)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
btmandtopController.GlobalSettingsVisibilityChanged += HandleSettingsVisibilityChanged;
|
||||
settingsSubscribed = true;
|
||||
btmandtopController.GlobalOverlayPanelVisibilityChanged += HandleOverlayPanelsVisibilityChanged;
|
||||
overlaySubscribed = true;
|
||||
}
|
||||
|
||||
private void UnsubscribeSettingsVisibility()
|
||||
private void UnsubscribeOverlayVisibility()
|
||||
{
|
||||
if (!settingsSubscribed)
|
||||
if (!overlaySubscribed)
|
||||
{
|
||||
settingsSubscribed = false;
|
||||
overlaySubscribed = false;
|
||||
return;
|
||||
}
|
||||
|
||||
btmandtopController.GlobalSettingsVisibilityChanged -= HandleSettingsVisibilityChanged;
|
||||
settingsSubscribed = false;
|
||||
btmandtopController.GlobalOverlayPanelVisibilityChanged -= HandleOverlayPanelsVisibilityChanged;
|
||||
overlaySubscribed = false;
|
||||
}
|
||||
|
||||
private void HandleSettingsVisibilityChanged(bool visible)
|
||||
private void HandleOverlayPanelsVisibilityChanged(bool visible)
|
||||
{
|
||||
ApplySettingsVisibility(visible);
|
||||
ApplyOverlayVisibility(visible);
|
||||
}
|
||||
|
||||
private void ApplySettingsVisibility(bool settingsVisible)
|
||||
private void ApplyOverlayVisibility(bool overlayVisible)
|
||||
{
|
||||
if (uRaderObj == null)
|
||||
{
|
||||
@@ -194,7 +195,7 @@ public class uBehaviourRaderController : MonoBehaviour
|
||||
return;
|
||||
}
|
||||
|
||||
uRaderObj.SetActive(!settingsVisible);
|
||||
uRaderObj.SetActive(!overlayVisible);
|
||||
}
|
||||
|
||||
private void ApplySummary(BehaviourRadarSummary summary)
|
||||
|
||||
Reference in New Issue
Block a user