using System; using System.Collections; using System.Collections.Generic; using UnityEngine; namespace AndroidWrapper { /// /// 监听音量变化的监听接口 /// public class VoiceVolumnChangedIntereface : AndroidJavaProxy { /// /// 音量变化委托事件 /// Action _mVoiceVolumnChanged; public VoiceVolumnChangedIntereface(Action VoiceVolumnChanged) : base("com.example.voicevolumnwrapper.VoiceVolumnChangedIntereface") { _mVoiceVolumnChanged = VoiceVolumnChanged; } /// /// 监听音量变化的接口 /// /// public void VoiceVolumnChanged(int currentValue) { if (_mVoiceVolumnChanged != null) { _mVoiceVolumnChanged(currentValue); } Debug.Log(GetType() + "/VoiceVolumnChanged()/ 监听音量变化的接口函数执行"); } } }