Is there a way I could have a still object move after it eats something? For example I want my rocket to stay still when it spawns, but when it eats my turtle, it will move vertically upward towards the top edge as if the turtle is riding the rocket.
This is what I have so far, but it doesn't work.
public void act() { ifCanSeeTurtle(); } public void ifCanSeeTurtle() { if (canSee(Turtle.class)) { eat(Turtle.class); setImage("rocketCopy02.png"); move(4); } }