Ejemplo n.º 1
0
    public void OnPlayVoiceChatOverItem()
    {
        if (null == VoiceEmotion)
        {
            return;
        }

        PlayVoiceChatBtnLogic voiceBtnLogic = VoiceEmotion.GetComponent <PlayVoiceChatBtnLogic>();

        if (null != voiceBtnLogic &&
            null != GameManager.gameManager.PlayerDataPool.VoiceChatDownloadRecord &&
            voiceBtnLogic.VoiceChatIndex == GameManager.gameManager.PlayerDataPool.VoiceChatDownloadRecord.PlayingVoiceIndex)
        {
            voiceBtnLogic.StopVoice();
        }
    }
Ejemplo n.º 2
0
    public void OnPlayVoiceChatItem()
    {
        if (null == VoiceEmotion)
        {
            return;
        }

        PlayVoiceChatBtnLogic playVoiceBtn = VoiceEmotion.GetComponent <PlayVoiceChatBtnLogic>();

        if (playVoiceBtn == null)
        {
            return;
        }

        if (playVoiceBtn.VoiceChatIndex == GameManager.gameManager.PlayerDataPool.VoiceChatDownloadRecord.PlayingVoiceIndex)
        {
            playVoiceBtn.PlayVoice();
        }
        else
        {
            playVoiceBtn.StopVoice();
        }
    }