52 lines
943 B
C#
52 lines
943 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.Video;
|
|
|
|
public class GuoLuGongNeng : MonoBehaviour
|
|
{
|
|
/// <summary>
|
|
/// 功能页面
|
|
/// </summary>
|
|
|
|
[Header("页面")]
|
|
public GameObject[] Pages;
|
|
|
|
|
|
|
|
private void OnDisable()
|
|
{
|
|
//动画结束
|
|
GuoLuBaoZhang.Instance.EndPlayAnim();
|
|
|
|
for (int i = 0; i < Pages.Length; i++) {
|
|
Pages[i].gameObject.SetActive(false);
|
|
}
|
|
}
|
|
|
|
private void OnEnable()
|
|
{
|
|
Pages[0].SetActive(true);
|
|
|
|
//锅炉开始爆炸
|
|
GuoLuBaoZhang.Instance.StartPlayAnim();
|
|
}
|
|
|
|
// 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)
|
|
{
|
|
GuoLuManager.Instance.ToEndVideo(0);
|
|
}
|
|
}
|
|
}
|