56 lines
1.2 KiB
C#
56 lines
1.2 KiB
C#
using TMPro;
|
|
using UnityEngine;
|
|
using UnityEngine.Video;
|
|
|
|
public class GameManager : MonoBehaviour
|
|
{
|
|
private static GameManager instance;
|
|
public static GameManager Instance { get { return instance; } }
|
|
|
|
|
|
public GameObject goParent;
|
|
public GameObject aIquestionAnswer;
|
|
public GameObject questionAnswer;
|
|
public GameObject onePageOne;
|
|
|
|
public GameObject BlackboardOne;
|
|
|
|
public GameObject OnePageThree;
|
|
public TextMeshProUGUI infoTGo;
|
|
public GameObject onePageEnd;
|
|
public GameObject Robot;
|
|
public InfoShow infoShow;
|
|
public GameObject Shop;
|
|
public GameObject ImgMask;
|
|
void Start()
|
|
{
|
|
|
|
if (instance==null)
|
|
{
|
|
instance = this;
|
|
}
|
|
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
|
|
}
|
|
[Header("视频播放相关")]
|
|
public VideoPlayer videoPlayer;
|
|
public void showVideoPlayer(string path)
|
|
{
|
|
string fullPath = System.IO.Path.Combine(Application.streamingAssetsPath, path);
|
|
videoPlayer.url = fullPath;
|
|
// 播放视频
|
|
videoPlayer.Play();
|
|
}
|
|
|
|
public void StopVideoPlayer()
|
|
{
|
|
// 播放视频
|
|
videoPlayer.Stop();
|
|
}
|
|
}
|