diff --git a/Assets/Scripts/Line/LineConnect.cs b/Assets/Scripts/Line/LineConnect.cs index 8ca5483..a9eebf5 100644 --- a/Assets/Scripts/Line/LineConnect.cs +++ b/Assets/Scripts/Line/LineConnect.cs @@ -73,7 +73,7 @@ public class LineConnect : MonoBehaviour public bool isClick = false; private void OnMouseDown() { - if (!isClick && LineManager.instance.Addtime >= 4) + if (!isClick && LineManager.instance.Addtime >= 1.5f) { isClick = true; Debug.Log(transform.name); diff --git a/Assets/Scripts/Line/LineManager.cs b/Assets/Scripts/Line/LineManager.cs index a215000..2e338ce 100644 --- a/Assets/Scripts/Line/LineManager.cs +++ b/Assets/Scripts/Line/LineManager.cs @@ -78,13 +78,24 @@ public class LineManager : SerializedMonoBehaviour public void ResetLine() { #region 弃用保存连线方法 - if (PlayerPrefs.GetString("LineData") != "") + + if (PlayerPrefs.GetString("LineData") != "" && PlayerPrefs.GetString("LineData") != null) { int index = PlayerPrefs.GetInt("classnum"); + if (UI_ExperimentChooesPanel.instance != null) + { + for (int i = 0; i < UI_ExperimentChooesPanel.instance.SubjectTog.Count; i++) + { + if (UI_ExperimentChooesPanel.instance.SubjectTog[i].name.Replace("-", "") == (PlayerPrefs.GetInt("classnum").ToString())) + { + UI_ExperimentChooesPanel.instance.SubjectTog[i].isOn = (true); + } + } + } Models = new List(); Highlights = new List(); Highlights_Backup = new List(); - + string str = PlayerPrefs.GetString("LineData"); lineData = JsonConvert.DeserializeObject(PlayerPrefs.GetString("LineData")); Models = Modeldic[index].ToList(); Highlights_Backup = highlightsdic[index].ToList(); @@ -124,16 +135,6 @@ public class LineManager : SerializedMonoBehaviour Highlights[0].highlighted = true; Highlights[0].GetComponent().enabled = true; } - if (UI_ExperimentChooesPanel.instance != null) - { - for (int i = 0; i < UI_ExperimentChooesPanel.instance.SubjectTog.Count; i++) - { - if (UI_ExperimentChooesPanel.instance.SubjectTog[i].name.Replace("-", "") == (PlayerPrefs.GetInt("classnum").ToString())) - { - UI_ExperimentChooesPanel.instance.SubjectTog[i].SetIsOnWithoutNotify(true); - } - } - } Initialization(PlayerPrefs.GetInt("classnum")); #endregion } @@ -220,8 +221,11 @@ public class LineManager : SerializedMonoBehaviour Highlights_Backup = highlightsdic[indext].ToList(); Models.ForEach((x) => { x.SetActive(false); }); Models = Modeldic[indext].ToList(); - PlayerPrefs.SetInt("classnum", indext); - PlayerPrefs.SetString("LineData", ""); + if (PlayerPrefs.GetInt("classnum") != indext) + { + PlayerPrefs.SetInt("classnum", indext); + PlayerPrefs.SetString("LineData", ""); + } Initialization(indext); //isInit = false; } diff --git a/Assets/Scripts/UI/UIPanel/UI_RoamingPanel.cs b/Assets/Scripts/UI/UIPanel/UI_RoamingPanel.cs index 7ca5be8..c8777b4 100644 --- a/Assets/Scripts/UI/UIPanel/UI_RoamingPanel.cs +++ b/Assets/Scripts/UI/UIPanel/UI_RoamingPanel.cs @@ -54,6 +54,7 @@ public class UI_RoamingPanel : BasePanel /// private IEnumerator RoamingIE() { + yield return new WaitForSeconds(3f); GameManager.Instance.MoveCamera.transform.SetLocalPositionAndRotation(GameManager.Instance.MoveAndRotatePonit[1].position, GameManager.Instance.MoveAndRotatePonit[2].rotation); @@ -63,6 +64,7 @@ public class UI_RoamingPanel : BasePanel GameManager.Instance.MoveAndRotatePonit[3].rotation); yield return new WaitForSeconds(3.6f); LineManager.instance.ResetLine(); + yield return new WaitForSeconds(1f); Bootstrap.Instance.uiManager.HidePanel(); } diff --git a/Assets/Scripts/UI/UIPanel/UI_TopTitlePanel.cs b/Assets/Scripts/UI/UIPanel/UI_TopTitlePanel.cs index efc6b87..c2312c9 100644 --- a/Assets/Scripts/UI/UIPanel/UI_TopTitlePanel.cs +++ b/Assets/Scripts/UI/UIPanel/UI_TopTitlePanel.cs @@ -118,13 +118,13 @@ public class UI_TopTitlePanel : BasePanel { Bootstrap.Instance.uiManager.ShowPanel(this, E_UI_Layer.Mid, (panel) => { - Bootstrap.Instance.uiManager.ShowPanel(this, E_UI_Layer.Top, (panel) => - { + //Bootstrap.Instance.uiManager.ShowPanel(this, E_UI_Layer.Top, (panel) => + //{ Bootstrap.Instance.uiManager.HidePanel(); Bootstrap.Instance.uiManager.HidePanel(); Bootstrap.Instance.uiManager.HidePanel(); Debug.Log("场景加载成功"); - }); + //}); }); } );