Beispiel #1
0
 public override void LoadContent()
 {
     base.LoadContent();
     XmlManager<Player> playerLoader = new XmlManager<Player>();
     XmlManager<Map> mapLoader = new XmlManager<Map>();
     texturebg = content.Load<Texture2D>("Images/paper");
     font = content.Load<SpriteFont>("Fonts/Test");
     player = playerLoader.Load("Load/Game/Player.xml");
     map = mapLoader.Load("Load/Game/Maps/Map_Two.xml");
     map.LoadContent();
     player.LoadContent();
     music = content.Load<SoundEffect>("Music/sad");
     paper = content.Load<SoundEffect>("Music/paper");
     music.Play();
     player.Image.Position = new Vector2(320, 240);
 }
Beispiel #2
0
        public override void LoadContent()
        {
            base.LoadContent();
            XmlManager<Player> playerLoader = new XmlManager<Player>();
            XmlManager<Map> mapLoader = new XmlManager<Map>();
            texturebg = content.Load<Texture2D>("Images/paper");
            font = content.Load<SpriteFont>("Fonts/Test");
            player = playerLoader.Load("Load/Game/Player.xml");
            map = mapLoader.Load("Load/Game/Maps/Map_One.xml");
            music = content.Load<SoundEffect>("Music/midnightwaltz");
            paper = content.Load<SoundEffect>("Music/paper");
            typewriter = content.Load<SoundEffect>("Music/typewriter");
            map.LoadContent();
            player.LoadContent();

            sei = music.CreateInstance();
            sei.Volume = 0.5f;
            sei.Play();
            player.Image.Position = new Vector2(320,240);
        }