This site requires JavaScript, please enable it in your browser!
Greenfoot back
Josh_H
Josh_H wrote ...

2015/12/11

Accessing one actor from another

Josh_H Josh_H

2015/12/11

#
I have a field of 81 tiles and they are all one class that I just used data abstraction to place them in different places. They have an int called 'surrounding' inside of them and if the 'surrounding' value is equal to '0', that means the surrounding 8 tiles are safe. How do I tell the actor to set the image of the surrounding 8 tiles to 'number' if the mouse is clicked on that tile and 'surrounding' = 0?
danpost danpost

2015/12/11

#
You will need to include the code of your world class (the information in it is needed for multiple things). The code to your Tile class may be helpful also.
You need to login to post a reply.