/// <summary> /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base.Initialize will enumerate through any components /// and initialize them as well. /// </summary> protected override void Initialize() { // TODO: Add your initialization logic here map = new GameMap(); enemy = new Enemy(); base.Initialize(); }
//Change Enemy Tile public Vector2 enemyTileChangeCheck(Enemy enemy) { if (enemy.currentTile.Y > 0 && enemy.currentTile.Y < 8) { if (enemy.currentTile.X == 0) { } } return enemy.currentTile; }
public void SpawnEnemy(int path) { Enemy thisEnemy = new Enemy( texture, pathWaypoints[path][0], initialFrame, frameCount); for (int x = 0; x < pathWaypoints[path].Count(); x++) { thisEnemy.AddWaypoint(pathWaypoints[path][x]); } Enemies.Add(thisEnemy); }
public Enemy spawn(Enemy enemy, int x, int y, int gameTime) { enemy.width = 40; enemy.height = 115; enemy.spawnTime = gameTime; enemy.x = x; enemy.y = y - enemy.height; enemy.texture = "normal"; enemy.status = "spawn"; enemy.rectangle = new Rectangle(enemy.x, enemy.y, enemy.width, enemy.height); enemy.currentTile = new Vector2(0, 2); enemy.lastMoveTime = gameTime; return enemy; }