using System.Collections.Generic; using UnityEngine; namespace Cryville.Crtr { public class EffectManager { readonly Dictionary _groups = new Dictionary(); 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(); } } }