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