I have been working on a sidescroller for about 2 weeks or so. but I was having trouble with I tile that I made to conduct electricity.
how it works is there is a button tile and when you stand on it it trigers the wire and then opens the door. I just use a boolean for each tile to say if its powered or not. Basically my problem the power is doubling back and a wire is powering a wire, not a button.
so How to I have it so that the electricity can go through tons of different* ways but only one at a time.
*By tons I mean 8 one for every tile next to the tile.
Broken Wire Tile Code
http://www.java-gaming.org/?action=pastebin&id=292
all its doing is looking to see if its powered in the update method
and the if(level != null) is important because its tends to load without init’ing the level properly.