修改问题

This commit is contained in:
lujiajian 2026-03-06 09:55:08 +08:00
parent 57f818d264
commit 95c7d92d3b
4 changed files with 24 additions and 18 deletions

View File

@ -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);

View File

@ -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<GameObject>();
Highlights = new List<HighlightEffect>();
Highlights_Backup = new List<HighlightEffect>();
string str = PlayerPrefs.GetString("LineData");
lineData = JsonConvert.DeserializeObject<LineData>(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<BoxCollider>().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;
}

View File

@ -54,6 +54,7 @@ public class UI_RoamingPanel : BasePanel
/// <returns></returns>
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<UI_RoamingPanel>();
}

View File

@ -118,13 +118,13 @@ public class UI_TopTitlePanel : BasePanel
{
Bootstrap.Instance.uiManager.ShowPanel<UI_ChooesPanel>(this, E_UI_Layer.Mid, (panel) =>
{
Bootstrap.Instance.uiManager.ShowPanel<UI_TopTitlePanel>(this, E_UI_Layer.Top, (panel) =>
{
//Bootstrap.Instance.uiManager.ShowPanel<UI_TopTitlePanel>(this, E_UI_Layer.Top, (panel) =>
//{
Bootstrap.Instance.uiManager.HidePanel<UI_LoginPanel>();
Bootstrap.Instance.uiManager.HidePanel<UI_TopTipPanel>();
Bootstrap.Instance.uiManager.HidePanel<UI_ExperimentChooesPanel>();
Debug.Log("³¡¾°¼ÓÔØ³É¹¦");
});
//});
});
}
);