Exemplo n.º 1
0
 public LevelWadSelector(Arkanoid game, bool twoPlayer, LevelWad wad, int level, bool left)
 {
     Game      = game;
     TwoPlayer = twoPlayer;
     IsLeft    = left;
     Wad       = wad;
     if (!game.Settings.Unlocks.ContainsKey(wad.Name))
     {
         //exception not set.
         game.Settings.Unlocks.Add(wad.Name, new WadScore
         {
             Name = wad.Name
         });
     }
     else if (level == -1)
     {
         try
         {
             level = game.Settings.Unlocks[wad.Name].LevelScores.Count;
         }
         catch
         {
             level = 0;
         }
     }
     Level = level;
     Name  = "Round " + (Level + 1);
 }
Exemplo n.º 2
0
 public static void LoadWads(Arkanoid game, GraphicsDevice graphicsDevice, ContentManager content)
 {
     ArkanoidWad = new LevelWad(game, "Arkanoid", content.Load <Texture2D>("Level/Arkanoid/Box.png"),
                                content.Load <Texture2D>("Level/Arkanoid/Title.png"), ArkanoidLevels);
     ArkanoidDxWad = new LevelWad(game, "Arkanoid DX", content.Load <Texture2D>("Level/Arkanoid DX/Box.png"),
                                  content.Load <Texture2D>("Level/Arkanoid DX/Title.png"), ArkanoidDxLevels);
     RevengeOfTheDohWad = new LevelWad(game, "Revenge Of The Doh",
                                       content.Load <Texture2D>("Level/Revenge Of The Doh/Box.png"),
                                       content.Load <Texture2D>("Level/Revenge Of The Doh/Title.png"), RevengeOfTheDohLevels);
     ArkanoidTournamentWad = new LevelWad(game, "Arkanoid Tournament",
                                          content.Load <Texture2D>("Level/Tournament/Box.png"),
                                          content.Load <Texture2D>("Level/Tournament/Title.png"), ArkanoidTournamentLevels);
     Wads = new List <LevelWad> {
         ArkanoidWad, ArkanoidDxWad, RevengeOfTheDohWad, ArkanoidTournamentWad
     };
 }
Exemplo n.º 3
0
        public static void UpdateCustom(Arkanoid game)
        {
            var folder = AsyncIO.CreateFolderAsync(ApplicationData.Current.RoamingFolder, "Custom");
            var files  = AsyncIO.GetFilesAsync(folder).Where(f => f.Name.EndsWith(".level"));
            var levels = files.ToList();

            if (levels.Count != 0)
            {
                var levelList =
                    levels.Select(
                        f => new KeyValuePair <Level, Level>(LevelIO.ReadLevel(AsyncIO.ReadTextFileAsync(f)), null))
                    .ToList();
                var customWad = new LevelWad(game, "Custom", Textures.CmnTitle, Textures.CmnVerCustom, levelList);
                var ow        = Wads.Find(p => p.Name == "Custom");
                if (ow != null)
                {
                    Wads.Remove(ow);
                }
                Wads.Add(customWad);
            }
        }
 public EditLevelWadSelector(Arkanoid game, LevelWad wad, string editPath, int level, bool left)
     : base(game, false, wad, level, left)
 {
     EditPath = editPath;
 }
Exemplo n.º 5
0
 public DemoLevelWadSelector(Arkanoid game, LevelWad wad, int level, bool left) : base(game, false, wad, level, left)
 {
 }