示例#1
0
 /// <summary>
 /// Podwyższenie aktualnego poziomu gry
 /// </summary>
 public void UpgradePlayersLevel()
 {
     if (gameLevel < 5)
     {
         ++gameLevel;
         objects = new MapObject[width, height];
         random_operator.GenerateRandomMap(width, height, gameLevel, player.DifficultyLevel);
         CovertIntToObjects(ref objects, random_operator.Map);
     }
 }
示例#2
0
 /// <summary>
 /// Konstruktor wysyoływany w przypadku ładownaia nowej gry
 /// </summary>
 /// <param name="tile_size">rozmiar komórki mapy</param>
 /// <param name="width">szerokosc mapy</param>
 /// <param name="height">wysokosc mapy</param>
 /// <param name="content">XNA Content</param>
 /// <param name="player">instancja gracza</param>
 /// <param name="gameLevel">poziom gry</param>
 public Map(int tile_size, int width, int height, ContentManager content, Player player,  int gameLevel = 1)
 {
     this.player = player;
     this.gameLevel = gameLevel;
     this.content = content;
     this.width = width;
     this.height = height;
     this.player = player;
     this.tile_size = tile_size;
     objects = new MapObject[width, height];
     random_operator = new RandomOperator(width, height);
     random_operator.GenerateRandomMap(width, height, gameLevel,player.DifficultyLevel);
     CovertIntToObjects(ref objects, random_operator.Map);
 }
示例#3
0
 /// <summary>
 /// Konstruktor wysyoływany w przypadku ładownaia nowej gry
 /// </summary>
 /// <param name="tile_size">rozmiar komórki mapy</param>
 /// <param name="width">szerokosc mapy</param>
 /// <param name="height">wysokosc mapy</param>
 /// <param name="content">XNA Content</param>
 /// <param name="player">instancja gracza</param>
 /// <param name="gameLevel">poziom gry</param>
 public Map(int tile_size, int width, int height, ContentManager content, Player player, int gameLevel = 1)
 {
     this.player     = player;
     this.gameLevel  = gameLevel;
     this.content    = content;
     this.width      = width;
     this.height     = height;
     this.player     = player;
     this.tile_size  = tile_size;
     objects         = new MapObject[width, height];
     random_operator = new RandomOperator(width, height);
     random_operator.GenerateRandomMap(width, height, gameLevel, player.DifficultyLevel);
     CovertIntToObjects(ref objects, random_operator.Map);
 }