调整UI钱备份提交

This commit is contained in:
高铎 2025-10-21 14:02:29 +08:00
parent bb55243e1b
commit 76e485c33b
6 changed files with 545 additions and 544 deletions

View File

@ -143,7 +143,7 @@ MonoBehaviour:
m_PersistentCalls: m_PersistentCalls:
m_Calls: [] m_Calls: []
m_FontData: m_FontData:
m_Font: {fileID: 12800000, guid: eddf27c2e02803f4cbe2a9a7ecf240bb, type: 3} m_Font: {fileID: 12800000, guid: 3b6045d444761e94d9b00de6f4f7ef42, type: 3}
m_FontSize: 40 m_FontSize: 40
m_FontStyle: 2 m_FontStyle: 2
m_BestFit: 0 m_BestFit: 0

File diff suppressed because it is too large Load Diff

View File

@ -20,7 +20,7 @@ public class GameObject_Pool : MonoSingleton<GameObject_Pool>
{ {
GameObject go = poolDic[typeName].Dequeue(); GameObject go = poolDic[typeName].Dequeue();
go.transform.SetParent(parent); go.transform.SetParent(parent);
this.Error($"取出对象池,现在长度为:{poolDic[typeName].Count}"); this.Log($"取出对象池,现在长度为:{poolDic[typeName].Count}");
return go; return go;
} }
else else
@ -38,7 +38,7 @@ public class GameObject_Pool : MonoSingleton<GameObject_Pool>
GameObject go = Resources.Load<GameObject>("souSuoBtn"); GameObject go = Resources.Load<GameObject>("souSuoBtn");
GameObject obj = GameObject.Instantiate(go, parent); GameObject obj = GameObject.Instantiate(go, parent);
poolDic[typeName].Enqueue(obj); poolDic[typeName].Enqueue(obj);
this.Error($"取出对象池,现在长度为:{poolDic[typeName].Count}"); this.Log($"取出对象池,现在长度为:{poolDic[typeName].Count}");
return poolDic[typeName].Dequeue(); return poolDic[typeName].Dequeue();
} }
@ -51,7 +51,7 @@ public class GameObject_Pool : MonoSingleton<GameObject_Pool>
if (poolDic[typeName] != null) if (poolDic[typeName] != null)
{ {
poolDic[typeName].Enqueue(obj); poolDic[typeName].Enqueue(obj);
this.Error($"放入对象池,现在长度为:{poolDic[typeName].Count}"); this.Log($"放入对象池,现在长度为:{poolDic[typeName].Count}");
} }
else else
{ {

View File

@ -40,7 +40,6 @@ public class SouSuoPanel : UIBase
private void InputSubmit(string arg0) private void InputSubmit(string arg0)
{ {
if (string.IsNullOrEmpty(arg0)) return;
if (souSuoBtn_Que.Count > 0) if (souSuoBtn_Que.Count > 0)
{ {
int num = souSuoBtn_Que.Count; int num = souSuoBtn_Que.Count;
@ -51,6 +50,7 @@ public class SouSuoPanel : UIBase
GameObject_Pool.Instance.PutInGame("souSuoBtn", g); GameObject_Pool.Instance.PutInGame("souSuoBtn", g);
} }
} }
if (string.IsNullOrEmpty(arg0)) return;
for (int i = 0; i < allJingLuoSmall.Count; i++) for (int i = 0; i < allJingLuoSmall.Count; i++)
{ {
if (allJingLuoSmall[i].XueWeiName_NoPinYin.Contains(arg0)) if (allJingLuoSmall[i].XueWeiName_NoPinYin.Contains(arg0))
@ -66,10 +66,17 @@ public class SouSuoPanel : UIBase
//allSouSuoBtn.Add(btn); //allSouSuoBtn.Add(btn);
GameObject go = GameObject_Pool.Instance.TakeOutGame("souSuoBtn", transform.FindFirst("souSuoBtnContent").transform); GameObject go = GameObject_Pool.Instance.TakeOutGame("souSuoBtn", transform.FindFirst("souSuoBtnContent").transform);
go.SetActive(true); go.SetActive(true);
go.GetComponent<BtnImage>().OnExitBtn();
go.GetComponentInChildren<Text>().text = allJingLuoSmall[i].XueWeiName_NoPinYin; go.GetComponentInChildren<Text>().text = allJingLuoSmall[i].XueWeiName_NoPinYin;
souSuoBtn_Que.Enqueue(go); souSuoBtn_Que.Enqueue(go);
go.GetComponent<Button>().onClick.AddListener(() => go.GetComponent<Button>().onClick.AddListener(() =>
{ {
GameObject[] arr = souSuoBtn_Que.ToArray();
for (int i = 0; i < arr.Length; i++)
{
arr[i].GetComponent<BtnImage>().OnExitBtn();
}
go.GetComponent<BtnImage>().OnEnterBtn();
uiManager.GetUI<LeftBigBtnPanel>().EnterBigBtnCallBack(allJingLuoSmall[id].name); uiManager.GetUI<LeftBigBtnPanel>().EnterBigBtnCallBack(allJingLuoSmall[id].name);
uiManager.GetUI<LeftBigBtnPanel>().EnterSmallBtnCallBack(allJingLuoSmall[id].XueWeiName_NoPinYin); uiManager.GetUI<LeftBigBtnPanel>().EnterSmallBtnCallBack(allJingLuoSmall[id].XueWeiName_NoPinYin);
}); });

View File

@ -11,9 +11,6 @@ EditorBuildSettings:
- enabled: 1 - enabled: 1
path: Assets/_Scenes/JingLuoXueWei.unity path: Assets/_Scenes/JingLuoXueWei.unity
guid: 3de828816d0951d47ba9e47a367bf162 guid: 3de828816d0951d47ba9e47a367bf162
- enabled: 1
path: Assets/_Scenes/Test.unity
guid: 6838f60898c557d42a8cca602c991a83
m_configObjects: m_configObjects:
Unity.XR.OpenVR.Settings: {fileID: 11400000, guid: 8a9a40fd98735ec43ab871cdb923050c, Unity.XR.OpenVR.Settings: {fileID: 11400000, guid: 8a9a40fd98735ec43ab871cdb923050c,
type: 2} type: 2}

View File

@ -234,9 +234,6 @@ PlayerSettings:
- {fileID: 0} - {fileID: 0}
- {fileID: 0} - {fileID: 0}
- {fileID: 0} - {fileID: 0}
- {fileID: 11400000, guid: 3db3688a2a595354b85c7eaf8378c199, type: 2}
- {fileID: -309469366483661929, guid: 01cc4f19af9590649a455275c2cdece7, type: 2}
- {fileID: 1811974137191554726, guid: 1cdbad8b379c1bf4a8b53c9511b20d8c, type: 2}
metroInputSource: 0 metroInputSource: 0
wsaTransparentSwapchain: 0 wsaTransparentSwapchain: 0
m_HolographicPauseOnTrackingLoss: 1 m_HolographicPauseOnTrackingLoss: 1