Thanks a lot! I used sprite masks and set the sprite mask interaction of the wall sprites to "visible inside sprite mask" and changed the material of the sprites so they could be affected by light. The game is top down 2D.
Wow thats great idea to realize this effect. Nice innovation! You made me feel I am playing one 3D game. But can you tell me how to pass the level 5. Is that I need to try many times to find the correct way or you made one hints inside the game. Because I can't find many walls in the last levels and all the screen is dark later~