Exemplo n.º 1
0
        protected NonCombatScreen(MenuSystem menusystem, TextSection textsection, String spritepath, String animationpath, String soundpath)
            : base(menusystem)
        {
            if (textsection == null) throw new ArgumentNullException("textsection");
            if (spritepath == null) throw new ArgumentNullException("spritepath");
            if (animationpath == null) throw new ArgumentNullException("animationpath");
            if (soundpath == null) throw new ArgumentNullException("soundpath");

            m_soundmanager = MenuSystem.GetSubSystem<Audio.SoundSystem>().CreateManager(soundpath);
            m_spritemanager = MenuSystem.GetSubSystem<Drawing.SpriteSystem>().CreateManager(spritepath);
            m_animationmanager = MenuSystem.GetSubSystem<Animations.AnimationSystem>().CreateManager(animationpath);
            m_backgrounds = new Backgrounds.Collection(m_spritemanager.Clone(), m_animationmanager.Clone());
            m_fadeintime = textsection.GetAttribute<Int32>("fadein.time");
            m_fadeouttime = textsection.GetAttribute<Int32>("fadeout.time");

            SpriteManager.LoadAllSprites();
        }
Exemplo n.º 2
0
 public StaticImage(Collection collection, String name, DataMap datamap, Drawing.SpriteManager sprites, Animations.AnimationManager animations, Audio.SoundManager sounds)
     : base(collection, name, datamap, sprites, animations, sounds)
 {
 }
Exemplo n.º 3
0
        public Base(Collection collection, string name, DataMap datamap, Drawing.SpriteManager sprites, Animations.AnimationManager animations, Audio.SoundManager sounds)
        {
            if (collection == null)
            {
                throw new ArgumentNullException(nameof(collection));
            }
            if (name == null)
            {
                throw new ArgumentNullException(nameof(name));
            }
            if (datamap == null)
            {
                throw new ArgumentNullException(nameof(datamap));
            }
            if (sprites == null)
            {
                throw new ArgumentNullException(nameof(sprites));
            }
            if (animations == null)
            {
                throw new ArgumentNullException(nameof(animations));
            }
            if (sounds == null)
            {
                throw new ArgumentNullException(nameof(sounds));
            }

            m_collection       = collection;
            m_name             = name;
            m_data             = datamap;
            m_spritemanager    = sprites;
            m_animationmanager = animations.Clone();
            m_soundmanager     = sounds;
        }