This is homework. Please do not write my code for me. I did look for this but only found things related to buttons or making a background, none of which had the answers I needed.
I have been working on a game. The game has some images floating around and you have to shoot them and then collide with them to eat them. I am trying to make the image change when you shoot them so that the player knows they can eat them. I tried using a variable that would contain the string which would be the location of the image and then setting that variable as a different string when the object is shot but that didn't work so well. I think my issues are somewhere in declaring my targets image and the fact that they are in a for loop when I try to change the image. I would post that failed attempt but it was seriously just an image name String variable and in my processCollision method I changed the String to the other image. The entire code is in my last thread but I can post it again if needed. Also let me know of anything else that you may need from me. Any and all help is appreciated! Thanks in advance!
Recommended Answers
Jump to PostI tried using a variable that would contain the string which would be the location of the image and then setting that variable as a different string when the object is shot but that didn't work so well
Why use a String instead of a class containing ints to hold …
All 2 Replies
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.