MyBook/Assets/Scripts/GameManager.cs

57 lines
1.2 KiB
C#
Raw Normal View History

2025-03-17 17:27:32 +08:00
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;
2025-03-17 20:43:54 +08:00
public bool stopAnimation = false;
2025-03-17 17:27:32 +08:00
void Start()
{
if (instance==null)
{
instance = this;
}
}
// Update is called once per frame
void Update()
{
}
[Header("<22><>Ƶ<EFBFBD><C6B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>")]
public VideoPlayer videoPlayer;
public void showVideoPlayer(string path)
{
string fullPath = System.IO.Path.Combine(Application.streamingAssetsPath, path);
videoPlayer.url = fullPath;
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƶ
videoPlayer.Play();
}
public void StopVideoPlayer()
{
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƶ
videoPlayer.Stop();
}
}