using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.SceneManagement; public class EndMachine : Interactive { //控制游戏最后那个电报机的脚本 // Start is called before the first frame update public AudioClip clip; public GameObject blackUI; void Start() { } // Update is called once per frame void Update() { } public override void OnCall() { blackUI.SetActive(true); FindObjectOfType().ChangedTheBGM(clip); Invoke("ReStart",2f); FindObjectOfType().stageName = ""; } private void ReStart(){SceneManager.LoadScene("开始游戏");} }