using Cryville.Common.Collections.Specialized; using UnityEngine; namespace Cryville.Crtr { public class EffectManager { readonly IntKeyedDictionary _groups = new IntKeyedDictionary(); public EffectManager(PdtSkin skin) { foreach (var e in skin.effects) { _groups.Add(e.Key.Key, new EffectGroup(e.Value)); } } public void Tick(double time) { foreach (var g in _groups) g.Value.Tick(time); } public void Emit(int id, float index) { _groups[id].Emit(index); } public void EmitSelf(int id, float index, Transform target) { _groups[id].Emit(index, target); } public void Dispose() { foreach (var g in _groups) g.Value.Dispose(); } } }