private bool EvaluateAudioNode() { AudioManager audioManager = m_sceneManager.GetAudioManager(); if (audioManager != null) { if (m_currentNode is BGMNode) { m_nodeProcessor.ProcessBGM(); event_NodeEvaluted?.Invoke(TypesNode.BGMNode); return(true); } else if (m_currentNode is SFXNode) { SFXNode sfxNode = m_currentNode as SFXNode; m_sceneManager.StartCoroutine(audioManager.PlaySFX(sfxNode.GetSFX(), true, sfxNode.GetWaitForFinish())); event_NodeEvaluted?.Invoke(TypesNode.SFXNode); return(true); } } else { if (m_currentNode is BGMNode || m_currentNode is SFXNode) { Debug.LogError("CNovell: SceneManager нуждается в AudioComponent, если ты используешь аудиоузлы!"); } } return(false); }
/// <summary> /// /// </summary> /// <returns></returns> private bool EvaluateAudioNode() { AudioManager audioManager = m_sceneManager.GetAudioManager(); if (audioManager != null) { if (m_currentNode is BGMNode) { m_nodeProcessor.ProcessBGM(); return(true); } else if (m_currentNode is SFXNode) { SFXNode sfxNode = m_currentNode as SFXNode; m_sceneManager.StartCoroutine(audioManager.PlaySFX(sfxNode.GetSFX(), true, sfxNode.GetWaitForFinish())); return(true); } } else { if (m_currentNode is BGMNode || m_currentNode is SFXNode) { Debug.LogError("DEVN: SceneManager needs an AudioComponent if you are using audio nodes!"); } } return(false); }