So I am still working on my Frogger project and when my bee touches a flower, i want it to move with the flowers (the flowers automatically move on their own). I can't tell what exactly is wrong with my code here. Any help?
This code is in the bee class:
public void act() { movement(); hitBird(); touchFlower1(); } public void touchFlower1() { Actor Flower1 = getOneIntersectingObject(flower1.class); if (Flower1 != null) { this.setLocation(Flower1.getX(),Flower1.getY()); } }