public MyEffectInstance CreateEffect(IMySourceVoice input, MyStringHash effect, MySourceVoice[] cues = null, float? duration = null) { if(!m_effects.ContainsKey(effect)) { Debug.Fail(string.Format("Effect not found: {0}", effect.ToString())); return null; } var instance = new MyEffectInstance(m_effects[effect], input, cues, duration, m_engine); m_activeEffects.Add(instance); return instance; }
public MyEffectInstance CreateEffect(IMySourceVoice input, MyStringId effect, MySourceVoice[] cues = null, float?duration = null) { if (!m_effects.ContainsKey(effect)) { Debug.Fail(string.Format("Effect not found: {0}", effect.ToString())); return(null); } var instance = new MyEffectInstance(m_effects[effect], input, cues, duration, m_engine); m_activeEffects.Add(instance); return(instance); }