public void WritePart(IEffectPartInfo info, XmlWriter writer) { if (!PartWriters.ContainsKey(info.GetType())) throw new Exception("No xml writer for effect part type: " + info.GetType().Name); var compWriter = PartWriters[info.GetType()]; compWriter.Write(info, writer); }
public void WritePart(IEffectPartInfo info, XmlWriter writer) { if (!PartWriters.ContainsKey(info.GetType())) { throw new Exception("No xml writer for effect part type: " + info.GetType().Name); } var compWriter = PartWriters[info.GetType()]; compWriter.Write(info, writer); }
private static Effect LoadEffectPart(IEffectPartInfo partInfo) { var t = partInfo.GetType(); if (!effectLoaders.ContainsKey(t)) throw new GameRunException("Unsupported effect type: " + t.Name); var loader = effectLoaders[t]; return loader.Load(partInfo); }