//CONSTRUCTOR public GameManager(ContentManager content) { _Player = new Player(content); _AI = new AI(content); _TWM = new TileWorldManager(content); _Timer = new Timer(content); }
public void shootAI(Player player, AI Ai) { this.player = player; this.enemy = Ai; shoot = true; currentPosition = new Vector2(player.getPosition().X, player.getPosition().Y); destinationPosition = new Vector2(Ai.getPosition().X+2, Ai.getPosition().Y); }
public void Update(GameTime gameTime, Player player) { fElapsed += (float)gameTime.ElapsedGameTime.TotalSeconds; if (fElapsed >= actionRate) { MoveToAttackY(player); fElapsed = 0f; } }
//BUILDING AI //No need to move to attack X since they will always be in there public void MoveToAttackY(Player player) { if (_Position.Y == player._Position.Y) return; if (_Position.Y > player._Position.Y) _Position.Y--; if (_Position.Y < player._Position.Y) _Position.Y++; }
public void shootPlayer(Player player) { shoot = true; destinationPosition = new Vector2(player.getPosition().X, player.getPosition().Y); }