public void _reigster_factory(string name, BaseEffectFactory factory) { if (!_factory_map.ContainsKey(name)) { _factory_map.Add(name, factory); } }
public BaseEffectFactory _find_factory(string type) { BaseEffectFactory ret = null; _factory_map.TryGetValue(type, out ret); return(ret); }
public BaseEffect CreateTrigger(string type) { BaseEffect ret = null; BaseEffectFactory factory = _find_factory(type); if (factory == null) { return(null); } ret = factory.Create(); return(ret); }