增加低通效果开关
- 引入DoTween - 实现功能
This commit is contained in:
@@ -1,18 +1,21 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using OCES.Audio;
|
||||
using UnityEngine.Audio;
|
||||
|
||||
namespace OCES
|
||||
{
|
||||
public class ButtonInvoker : MonoBehaviour
|
||||
{
|
||||
public GameState targetGameState;
|
||||
public bool enableLowpass;
|
||||
|
||||
Button m_button;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
this.m_button = GetComponent<Button>();
|
||||
|
||||
|
||||
this.m_button.onClick.AddListener(ButtonPressed);
|
||||
}
|
||||
@@ -25,6 +28,8 @@ namespace OCES
|
||||
private void ButtonPressed()
|
||||
{
|
||||
AudioSystem.Instance.SetState(this.targetGameState);
|
||||
|
||||
AudioSystem.Instance.SetLowpass(this.enableLowpass);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user