32 lines
672 B
C#
32 lines
672 B
C#
![]() |
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<BGMPlayer>().ChangedTheBGM(clip);
|
||
|
Invoke("ReStart",2f);
|
||
|
}
|
||
|
|
||
|
private void ReStart(){SceneManager.LoadScene("开始游戏");}
|
||
|
}
|