I have to assign like this for comparation,
I should get the image "wyellow.png" located on the location "550,700" by using getIntersectingObjects(); method. Because, my car moves from a location near to the traffic light's location. My car should detect the traffic light in a distance of 5.
So I tried like this,
I need to compare ,
Please help me to fix this project !
rimage = wred.png; //wred.png image to rimage yimage = wyellow.png; //wyellow.png image to yimage gimage = wgreen.png; //wgreen.png to gimage
getIntersectingObjects(5, true, TrafficSignal.class);
if ( getImage() == rimage)
{
pause();
}
elseif( getImage() == yimage)
{
pause();
}
elseif( getImage() == gimage)
{
move(1);
}

