Пример #1
0
        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);
        }
Пример #2
0
        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);
        }
Пример #3
0
        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);
        }
Пример #4
0
        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);
        }