I was hoping somebody could help me with this issue I've been having, which seeing I'm not sure what the actual name is of what I'm trying to achieve, I can't give a name. So I've uploaded a picture below that might help...
In my game, the player is able to build rooms, which is basically just a wall along the outside. This wall is created by tiles in a grid. Each tile is the same object, named Wall Tile. What I'm trying to achieve is a way to get the Wall Tile object to "detect" if it has another wall tile on each side, and therefore set it's type (in private variable) to two, and therefore setting it's animation frame to two. Similarly, Wall Tiles that detect they are on the edge somehow set their type and frame to 1.
Could somebody help me out with discovering a way to get these Wall Tiles objects to detect which position they are in?