61 lines
1.1 KiB
C#
61 lines
1.1 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class FuTiGongNeng : MonoBehaviour
|
|
{
|
|
/// <summary>
|
|
/// 功能页面
|
|
/// </summary>
|
|
|
|
[Header("页面")]
|
|
public GameObject[] Pages;
|
|
|
|
private void OnDisable()
|
|
{
|
|
Pages[0].gameObject.SetActive(false);
|
|
}
|
|
|
|
private void OnEnable()
|
|
{
|
|
Pages[0].SetActive(true);
|
|
|
|
FuTiBaoZhang.Instance.StartPlayAnim();
|
|
FuTiManager.Instance.ToCameraMoveToStartPos();
|
|
|
|
}
|
|
|
|
// Start is called before the first frame update
|
|
void Start()
|
|
{
|
|
|
|
}
|
|
|
|
public void SwitchPage(int pageNum)
|
|
{
|
|
Pages[pageNum].SetActive(true);
|
|
Pages[1-pageNum].SetActive(false);
|
|
|
|
if(pageNum==0)
|
|
{
|
|
FuTiManager.Instance.ToEndVideo(0);
|
|
}
|
|
}
|
|
|
|
public void EndPage()
|
|
{
|
|
if (Pages[1] != null) {
|
|
Pages[1].SetActive(false);
|
|
Pages[0].SetActive(true);
|
|
}
|
|
//动画结束
|
|
FuTiBaoZhang.Instance.EndPlayAnim();
|
|
|
|
FuTiManager.Instance.IsCanMove = false;
|
|
|
|
//摄像机还原,回到首页
|
|
FuTiManager.Instance.ToReturnCameraPos();
|
|
|
|
}
|
|
}
|