public Base Build(String name, IO.TextSection section, String prefix) { if (name == null) throw new ArgumentNullException("name"); if (section == null) throw new ArgumentNullException("section"); if (prefix == null) throw new ArgumentNullException("prefix"); DataMap datamap = new DataMap(section, prefix); Base element = null; switch (datamap.Type) { case ElementType.Animation: element = new AnimatedImage(this, name, datamap, SpriteManager, AnimationManager, SoundManager); break; case ElementType.Static: element = new StaticImage(this, name, datamap, SpriteManager, AnimationManager, SoundManager); break; case ElementType.Text: element = new Text(this, name, datamap, SpriteManager, AnimationManager, SoundManager); break; case ElementType.None: default: element = new Base(this, name, datamap, SpriteManager, AnimationManager, SoundManager); break; } m_elements.Add(element); return element; }
public Base(Collection collection, String name, DataMap datamap, Drawing.SpriteManager sprites, Animations.AnimationManager animations, Audio.SoundManager sounds) { if (collection == null) throw new ArgumentNullException("collection"); if (name == null) throw new ArgumentNullException("name"); if (datamap == null) throw new ArgumentNullException("datamap"); if (sprites == null) throw new ArgumentNullException("sprites"); if (animations == null) throw new ArgumentNullException("animations"); if (sounds == null) throw new ArgumentNullException("sounds"); m_collection = collection; m_name = name; m_data = datamap; m_spritemanager = sprites; m_animationmanager = animations.Clone(); m_soundmanager = sounds; }
public Base Build(String name, IO.TextSection section, String prefix) { if (name == null) { throw new ArgumentNullException("name"); } if (section == null) { throw new ArgumentNullException("section"); } if (prefix == null) { throw new ArgumentNullException("prefix"); } DataMap datamap = new DataMap(section, prefix); Base element = null; switch (datamap.Type) { case ElementType.Animation: element = new AnimatedImage(this, name, datamap, SpriteManager, AnimationManager, SoundManager); break; case ElementType.Static: element = new StaticImage(this, name, datamap, SpriteManager, AnimationManager, SoundManager); break; case ElementType.Text: element = new Text(this, name, datamap, SpriteManager, AnimationManager, SoundManager); break; case ElementType.None: default: element = new Base(this, name, datamap, SpriteManager, AnimationManager, SoundManager); break; } m_elements.Add(element); return(element); }
public Base Build(string name, IO.TextSection section, string prefix) { if (name == null) { throw new ArgumentNullException(nameof(name)); } if (section == null) { throw new ArgumentNullException(nameof(section)); } if (prefix == null) { throw new ArgumentNullException(nameof(prefix)); } var datamap = new DataMap(section, prefix); Base element; switch (datamap.Type) { case ElementType.Animation: element = new AnimatedImage(this, name, datamap, SpriteManager, AnimationManager, SoundManager); break; case ElementType.Static: element = new StaticImage(this, name, datamap, SpriteManager, AnimationManager, SoundManager); break; case ElementType.Text: element = new Text(this, name, datamap, SpriteManager, AnimationManager, SoundManager); break; default: element = new Base(this, name, datamap, SpriteManager, AnimationManager, SoundManager); break; } m_elements[element.Name] = element; return(element); }
public Text(Collection collection, String name, DataMap datamap, Drawing.SpriteManager sprites, Animations.AnimationManager animations, Audio.SoundManager sounds) : base(collection, name, datamap, sprites, animations, sounds) { }
public AnimatedImage(Collection collection, string name, DataMap datamap, Drawing.SpriteManager sprites, Animations.AnimationManager animations, Audio.SoundManager sounds) : base(collection, name, datamap, sprites, animations, sounds) { Reset(); }