Shegotwet/Assets/ResWork/ShowAlbum/ShowAlbum.cs

19 lines
511 B
C#
Raw Normal View History

2025-09-12 03:38:36 +00:00
using UnityEngine;
public class ShowAlbum : MonoBehaviourSingletonTemplate<ShowAlbum>
{
[SerializeField] GameObject m_MainUICanvas;
[SerializeField] ShowPanel m_ShowPanel;
private void Start()
{
m_ShowPanel.gameObject.SetActive(false);
}
2025-09-19 18:43:24 +00:00
public void Show<T>(T data, bool preview)
2025-09-12 03:38:36 +00:00
{
2025-09-19 20:05:08 +00:00
SoundInfo.Ins.Play_OneShot(eSound.s004_OpenAlbum);
2025-09-12 03:38:36 +00:00
m_MainUICanvas.SetActive(false);
2025-09-19 18:43:24 +00:00
m_ShowPanel.Set(data, preview, () => { m_MainUICanvas.SetActive(true); });
2025-09-12 03:38:36 +00:00
}
}