public Zombie(Map map, Vector2 position, string spriteSet) { this.map = map; this.position = position; this.velocity = Vector2.Zero; this.health = 1000; this.isAlive = true; LoadContent(spriteSet); }
/// <summary> /// Setup the flock boundaries and generate individual members of the flock /// </summary> /// <param name="tex"> The texture to be used by the birds</param> /// <param name="screenWidth">Width of the screen</param> /// <param name="screenHeight">Height of the screen</param> /// <param name="hoardParameters">Behavior of the flock</param> public Hoard( Game game, Random rnd, AIParameters hoardParameters) { boundryWidth = game.map.Width; boundryHeight = game.map.Height; map = game.map; //birdTexture = tex; hoard = new List<Enemy>(); hoardParams = hoardParameters; ResetHoard(game, rnd); }
private void LoadMap(string mapName) { // Unloads the content for the current level before loading the next one. if (map != null) map.Dispose(); // Load the level. string levelPath = string.Format("Content/Maps/{0}.txt", mapName); using (Stream fileStream = TitleContainer.OpenStream(levelPath)) map = new Map(Services, fileStream); }