public void LoadContent(ContentManager _content) { font = _content.Load<SpriteFont>("Arial"); emptyTexture = _content.Load<Texture2D>("Sprites/Empty"); wallTexture = _content.Load<Texture2D>("Sprites/Wall"); playerTexture = _content.Load<Texture2D>("Sprites/PlayerTest"); enemyTexture = _content.Load<Texture2D>("Sprites/EnemyTest"); for(int x = 0; x < size.X; x++) for (int y = 0; y < size.Y; y++) { cells[x, y] = new Cell(new Rectangle(x * 32, y * 32, 32, 32));//, 2, new Point(0, 0)); cells[x, y].LoadContent(_content); } enemy = new AiControlled(enemyTexture, new Rectangle(0, 0, 32, 32), 2, new Point(0, 0)); player = new AiControlled(playerTexture, new Rectangle(32, 0, 32, 32), 2, new Point(1, 0)); Show(); }
public void Reset() { enemy = new AiControlled(enemyTexture, new Rectangle(0, 0, 32, 32), 1, new Point(0, 0)); player = new AiControlled(playerTexture, new Rectangle(32, 0, 32, 32), 2, new Point(1, 0)); aStar.ClearBoard(); for (int x = 0; x < size.X; x++) for (int y = 0; y < size.Y; y++) cells[x, y].Reset(); }