I had 2 different objects which are two different types of bees. I was wondering if i could make it so that one type of bee would target an object flower and the other would only move inside a certain place (which will be the hive),
Not sure how to go about this. I have code to make the bees move around normally which is in the parent class. This is the code i have:
public class Bee extends Actor { public void flyAround() { //go forward move(2); //turn randomly if(Greenfoot.getRandomNumber(100) < 10) { turn(Greenfoot.getRandomNumber(30) - 15); } //if hit side, turn if(getX() <= 5 || getX() >= getWorld().getWidth() - 5) { turn(100); } //if hit side, turn if(getY() <= 5 || getY() >= getWorld().getHeight() - 5) { turn(100); } } }