27 lines
707 B
C#
27 lines
707 B
C#
using Cryville.Common.Collections.Specialized;
|
|
using UnityEngine;
|
|
|
|
namespace Cryville.Crtr {
|
|
public class EffectManager {
|
|
readonly IntKeyedDictionary<EffectGroup> _groups
|
|
= new IntKeyedDictionary<EffectGroup>();
|
|
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();
|
|
}
|
|
}
|
|
}
|