fix:风机初始化代码提交
This commit is contained in:
41
Assets/Scripts/AudioManage/Mute.cs
Normal file
41
Assets/Scripts/AudioManage/Mute.cs
Normal file
@@ -0,0 +1,41 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class Mute : MonoBehaviour
|
||||
{
|
||||
Camera cam;
|
||||
|
||||
|
||||
|
||||
public GameObject Audio;
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
cam = Camera.main;
|
||||
|
||||
Audio = GameObject.Find("Enviro 3/Audio");
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
public void GlobalMute()
|
||||
{
|
||||
|
||||
Audio.SetActive(false);
|
||||
|
||||
//Audio.SetActive(false);
|
||||
}
|
||||
public void UnMute()
|
||||
{
|
||||
Audio.SetActive(true);
|
||||
|
||||
//Audio.SetActive(true);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user