Weeb3.exe wrote...
how would i get it to set it to try and go to the persons last known location?
public class EnemyCharacters extends Actor
{
Betty player = (Betty)getWorld().getObjects(Betty.class).get(0);
int BettyX = player.getX();
int BettyY = player.getY();
/**
* Act - do whatever the EnemyCharacters wants to do. This method is called whenever
* the 'Act' or 'Run' button gets pressed in the environment.
*/
public void act()
{
// Add your action code here.
}
public void shoot()
{
if ( fire == false)
{
do
{
fireTimer--;
} while (fireTimer > 0);
fireTime();
fire = true;
fireTimer = 50;
}
}
public void fireTime()
{
EnemyBullet bullet = new EnemyBullet();
getWorld().addObject(bullet, getX(), getY());
bullet.move(06);
bullet.setRotation(BettyX,BettyY);
}bullet.setRotation(this);
bullet.setRotation(this);
bullet.setRotation(this);