Exemplo n.º 1
0
        public static Background CreateBackground(ContentManager content, Scene scene)
        {
            Dictionary <string, Texture2D> backgroundImages = new Dictionary <string, Texture2D>();

            foreach (var mapInfo in MapManager.Maps)
            {
                try
                {
                    backgroundImages.Add(mapInfo.Name, BackgroundLoader.Load(mapInfo.Name));
                }
                catch (ContentLoadException)
                {
                    backgroundImages.Add(mapInfo.Name, BackgroundLoader.Load("Default"));
                }
            }

            return(new Background(scene, backgroundImages));
        }
Exemplo n.º 2
0
        private void LoadClient()
        {
            UserHelper.Initialize(this);

            BackgroundLoader.Load();
        }