//public Map(Game game, SpriteBatch spriteBatch, int width, int height) // : this(game) //{ // _spriteBatch = spriteBatch; // components = new MapObjectCollection(width, height); //} public Map(Game game, SpriteBatch spriteBatch, Screen parent, int playersCount, string mapFile) : this(game, spriteBatch, parent) { this.ActivePlayers = playersCount; players = new Player[playersCount]; createMapFromFile(mapFile); creatures = new List <Being>(); SimpleCreature cr; for (int i = 0; i < playersCount * 2; i++) { cr = new SimpleCreature(this, generator.Next(3, Width - 3), generator.Next(3, Height - 3), "Images/simple1"); creatures.Add(cr); } }
//public Map(Game game, SpriteBatch spriteBatch, int width, int height) // : this(game) //{ // _spriteBatch = spriteBatch; // components = new MapObjectCollection(width, height); //} public Map(Game game, SpriteBatch spriteBatch, Screen parent, int playersCount, string mapFile) : this(game, spriteBatch, parent) { this.ActivePlayers = playersCount; players = new Player[playersCount]; createMapFromFile(mapFile); creatures = new List<Being>(); SimpleCreature cr; for (int i = 0; i < playersCount * 2; i++) { cr = new SimpleCreature(this, generator.Next(3, Width - 3), generator.Next(3, Height - 3), "Images/simple1"); creatures.Add(cr); } }