So, here I am again, but this time I've been experimenting with getObjectsInRange(). I have 2 classes, one is a car and the other a truck. If the truck comes into the proximity of the car, I need to swap the image of the Lives class from one showing 3 hearts to one showing 2 hearts. I managed to get this far in my head:
java.Util.List Collision = getObjectsInRange(20,Truck);
if (Collision.size() == 1) {
Actor n = new Actor;...not sure how you write that part!
n = Lives.class;
n.setImage("2 Lives.png");
Any help as to how I can set the image of the "Lives" class from within "Car" class under the given conditions? Any help would be great, as always.