Esempio n. 1
0
 /// <summary>
 /// Konstruktor wywoływany w pprzypadku ładowania zapisanej gry
 /// </summary>
 /// <param name="tile_size">rozmiar komórki mapy</param>
 /// <param name="width">Szerokośc mapy</param>
 /// <param name="height">Wysokośc mapy</param>
 /// <param name="map">Załadowana mapa</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, int[] map, 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);
     CovertSquareIntToObjects(ref objects, map);
 }
Esempio n. 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);
 }
Esempio n. 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);
 }
Esempio n. 4
0
 /// <summary>
 /// Konstruktor wywoływany w pprzypadku ładowania zapisanej gry
 /// </summary>
 /// <param name="tile_size">rozmiar komórki mapy</param>
 /// <param name="width">Szerokośc mapy</param>
 /// <param name="height">Wysokośc mapy</param>
 /// <param name="map">Załadowana mapa</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, int[] map, 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);
     CovertSquareIntToObjects(ref objects, map);
 }