68 lines
1.4 KiB
C#
68 lines
1.4 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using DG.Tweening;
|
|
using UnityEngine.UI;
|
|
using TMPro;
|
|
|
|
public class ManagerPaoZhangBase : MonoBehaviour
|
|
{
|
|
public static ManagerPaoZhangBase instance;
|
|
public Transform topPanel;
|
|
public Transform defaultPanel;
|
|
public GameObject paozhangMain;
|
|
|
|
//系统启动界面
|
|
public GameObject systemStartPage;
|
|
|
|
public TextMeshProUGUI downTip;
|
|
|
|
public GameObject basePage;
|
|
|
|
private void Awake()
|
|
{
|
|
if (instance == null)
|
|
instance = this;
|
|
ShowSystemStartPage();
|
|
}
|
|
|
|
|
|
private void OnEnable()
|
|
{
|
|
|
|
}
|
|
|
|
public void ShowSystemStartPage()
|
|
{
|
|
GameObject sys = LoadPage(systemStartPage, 1);
|
|
sys.transform.GetChild(1).GetComponent<Image>().DOFillAmount(1, 6f).SetEase(Ease.Linear).OnComplete(() => {
|
|
|
|
|
|
basePage.SetActive(true);
|
|
Destroy(sys);
|
|
});
|
|
}
|
|
|
|
public GameObject LoadPage(GameObject page, int level = 0)
|
|
{
|
|
GameObject currectPage;
|
|
if (level == 0)
|
|
currectPage=Instantiate(page, defaultPanel);
|
|
else
|
|
currectPage=Instantiate(page, topPanel);
|
|
|
|
return currectPage;
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// 设置底部提示信息,当需要隐藏时设置为""
|
|
/// </summary>
|
|
/// <param name="value"></param>
|
|
public void ShowDownTip(string value)
|
|
{
|
|
downTip.text = value;
|
|
}
|
|
|
|
}
|