Hello, I’m very new to coding and I primarily resort to watching YouTube tutorials step-by-step. The language that I use is C#, and I’m wondering how I would go about having a player die if they don’t reach specific areas in time. The game I’m attempting to make is where a 2D sprite walks down a street and hides from people frequently looking through their windows by being in the darkness between street lamps. Would anyone know how to go about doing this? Thanks.
I’ve attached a picture of the game so far, to possibly help visualize. I’m looking for the “safe zone” to be between the street lamps, where the light doesn’t reach.