The actor the user is in control of is called "PlatformJumper" and i want the "enemy" actor to follow the PlatformJumper if its in range. Turning would be helpful.
int range = 200; // this line added for set-up
if ( ! getObjectsInRange( range, Enemy.class ).isEmpty() )
{
Actor pj = getObjectsInRange( range, Enemy.class ).get( 0 );
turnTowards( pj.getX(), pj.getY() );
}Actor pj = (Actor) getObjectsInRange( range, Enemy.class ).get( 0 );
public void act()
{
followHuman();
}int range = 200; // this line added for set-up
if ( ! getObjectsInRange( range, Enemy.class ).isEmpty() )
{
Actor pj = getObjectsInRange( range, Enemy.class ).get( 0 );
turnTowards( pj.getX(), pj.getY() );
}listName.size() > 0
listName.isEmpty()