Compare commits

..

No commits in common. "5d5f9e09a2a42b9dd1a04aa3b955f4f8a99d1a21" and "b37b88b598aa597bb7b24092857058cbb5441e0b" have entirely different histories.

3 changed files with 12 additions and 30 deletions

View File

@ -44099,7 +44099,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
m_IsActive: 1
--- !u!224 &822021582
RectTransform:
m_ObjectHideFlags: 0
@ -44184,7 +44184,7 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: 10c807616459bc34fb5a3833c7535928, type: 3}
m_Sprite: {fileID: 21300000, guid: 2f1ccfa62d041a84da37034d725cb6a8, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
@ -90955,7 +90955,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
m_IsActive: 1
--- !u!224 &1589317998
RectTransform:
m_ObjectHideFlags: 0
@ -91040,7 +91040,7 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: 4e674e9115b77774f9cc9c50f4eada59, type: 3}
m_Sprite: {fileID: 21300000, guid: 06a248894c8e41944ac266cb317ffc54, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1

View File

@ -15,13 +15,6 @@ public enum LookAtCameraName
,
,
,
,
,
,
,
,
,
,
,
,

View File

@ -161,22 +161,22 @@ public class Manager : MonoBehaviour
}
}
# region
# region
/// <summary>
/// 加载台账界面
/// </summary>
/// <param name="ShowImage"></param>
/// <param name="LedgerImage"></param>
/// <param name="path"></param>
public void LoadLedgerFromResources(GameObject ShowImage ,Image LedgerImage ,Button CloesBtn,string path)
public void LoadLedgerFromResources(GameObject showImage ,Image LedgerImage ,Button CloesBtn,string path)
{
ShowImage.SetActive(true);
showImage.SetActive(true);
Sprite[] loadedSprites = Resources.LoadAll<Sprite>(path);
if (loadedSprites == null || loadedSprites.Length == 0)
{
Debug.LogError($"路径 {path} 中未找到任何Sprite文件夹中没图片");
ShowImage.SetActive(false);
Debug.LogError($"路径 {path} 中未找到任何Sprite");
showImage.SetActive(false);
return;
}
@ -195,7 +195,7 @@ public class Manager : MonoBehaviour
CloesBtn.onClick.AddListener(() =>
{
bookPages?.Clear();
ShowImage.SetActive(false);
showImage.SetActive(false);
Debug.Log("台账面板已关闭bookPages 列表已清空");
});
}
@ -209,11 +209,6 @@ public class Manager : MonoBehaviour
{
currentPage--;
UpDatePageDisplay();
// if (currentPage == 1)
// {
// NextOrPrevBtn[0].gameObject.SetActive(false);
// NextOrPrevBtn[1].gameObject.SetActive(true);
// }
}
}
/// <summary>
@ -226,11 +221,6 @@ public class Manager : MonoBehaviour
{
currentPage++;
UpDatePageDisplay();
// if (currentPage == bookPages.Count)
// {
// NextOrPrevBtn[0].gameObject.SetActive(true);
// NextOrPrevBtn[1].gameObject.SetActive(false);
// }
}
}
/// <summary>
@ -241,17 +231,16 @@ public class Manager : MonoBehaviour
Debug.Log(bookPages.Count);
if (currentPage >= 1 && currentPage <= bookPages.Count)
{
// 相当于原来的 "bookPages[currentPage - 1].SetActive(true)"
LedgerImage.sprite = bookPages[currentPage - 1];
LedgerImage.gameObject.SetActive(true);
Debug.Log($"显示第 {currentPage} 页,共 {bookPages.Count} 页");
}
else
{
Debug.Log("当前文件夹内为空");
// 如果页码无效,隐藏显示
LedgerImage.gameObject.SetActive(false);
}
NextOrPrevBtn[0].gameObject.SetActive(currentPage > 1); // 上一页
NextOrPrevBtn[1].gameObject.SetActive(currentPage < bookPages.Count); // 下一页
}
#endregion
}