public void PlayComboSound(EnumSoundComboType type, string key) { int comboID = GetModelComboID(); if (comboID == 0) { BehaviorManager.Instance.LogFormat(m_Agent, $"PlayComboSound comboID:{comboID} not have comboID in model.csv"); return; } int soundID = (int)type; SoundComboData data = m_CfgEternityProxy.GetSoundComboDataByKeyAndType(comboID, soundID); bool canPlay = (data.Place == 1 && m_Property.IsMain()) || data.Place == 3; if (canPlay) { Sound? sound = m_CfgEternityProxy.GetSoundByKey((uint)data.MusicId); SoundEvent soundEvent = m_CfgEternityProxy.GetSoundEvent((uint)sound.Value.EventId); WwiseUtil.PlaySound(comboID, (WwiseMusicSpecialType)soundID, m_Property.IsMain() ? WwiseMusicPalce.Palce_1st : WwiseMusicPalce.Palce_3st, false, soundEvent.Type ? m_Property.GetRootTransform() : null, (object obj) => { if (!string.IsNullOrEmpty(key) && m_Index.ContainsKey(key)) { m_Index[key]++; } }); } BehaviorManager.Instance.LogFormat(m_Agent, $"PlayComboSound comboID:{comboID} type:{type} canPlay:{canPlay}"); }
public void PlayComboSystemSound(EnumSoundComboType type, string key) { int soundID = (int)type; SoundComboData data = m_CfgEternityProxy.GetSoundComboDataByKeyAndType(WwiseManager.voiceComboID, soundID); bool canPlay = (data.Place == 1 && m_Property.IsMain()) || data.Place == 3; if (canPlay) { WwiseUtil.PlaySound(WwiseManager.voiceComboID, (WwiseMusicSpecialType)soundID, WwiseMusicPalce.Palce_1st, false, null, (object obj) => { if (!string.IsNullOrEmpty(key) && m_Index.ContainsKey(key)) { m_Index[key]++; } }); } BehaviorManager.Instance.LogFormat(m_Agent, $"PlayComboSound comboID:{WwiseManager.voiceComboID} type:{type} canPlay:{canPlay}"); }