早上提交
This commit is contained in:
parent
026ef33276
commit
e63afd2719
|
|
@ -44099,7 +44099,7 @@ GameObject:
|
|||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
m_IsActive: 0
|
||||
--- !u!224 &822021582
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -44184,7 +44184,7 @@ MonoBehaviour:
|
|||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 21300000, guid: 2f1ccfa62d041a84da37034d725cb6a8, type: 3}
|
||||
m_Sprite: {fileID: 21300000, guid: 10c807616459bc34fb5a3833c7535928, 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: 1
|
||||
m_IsActive: 0
|
||||
--- !u!224 &1589317998
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -91040,7 +91040,7 @@ MonoBehaviour:
|
|||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 21300000, guid: 06a248894c8e41944ac266cb317ffc54, type: 3}
|
||||
m_Sprite: {fileID: 21300000, guid: 4e674e9115b77774f9cc9c50f4eada59, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
|
|
|
|||
|
|
@ -15,6 +15,13 @@ public enum LookAtCameraName
|
|||
丹阳市富强五金铸造厂,
|
||||
江苏伟业铸造有限公司,
|
||||
江苏天乐金属制品有限公司,
|
||||
大丰丰鑫不锈钢制品厂,
|
||||
江苏创一精锻有限公司,
|
||||
江苏坚迈紧固件有限公司,
|
||||
江苏君霖纺织科技有限公司,
|
||||
江苏钰丰麦芽制造有限公司,
|
||||
江苏志得管业有限公司,
|
||||
盐城汇坚工业水处理有限公司,
|
||||
排污,
|
||||
厂房,
|
||||
农田
|
||||
|
|
|
|||
|
|
@ -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,6 +209,11 @@ public class Manager : MonoBehaviour
|
|||
{
|
||||
currentPage--;
|
||||
UpDatePageDisplay();
|
||||
// if (currentPage == 1)
|
||||
// {
|
||||
// NextOrPrevBtn[0].gameObject.SetActive(false);
|
||||
// NextOrPrevBtn[1].gameObject.SetActive(true);
|
||||
// }
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
|
|
@ -221,6 +226,11 @@ public class Manager : MonoBehaviour
|
|||
{
|
||||
currentPage++;
|
||||
UpDatePageDisplay();
|
||||
// if (currentPage == bookPages.Count)
|
||||
// {
|
||||
// NextOrPrevBtn[0].gameObject.SetActive(true);
|
||||
// NextOrPrevBtn[1].gameObject.SetActive(false);
|
||||
// }
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
|
|
@ -231,16 +241,17 @@ 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
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue