Creating a simple survival game.
When the player has been caught I want to display the amount of seconds that they survived for.
How do I go about this?
When your round starts, save the current time, e.g. copying
Once the round is over, compare your old value with the current
One fairly simple way to do this is to just make a variable called "SecondsSurvived" to either Player class or GameplayScreen/whatever. Then in the update method, if the game is not paused/stopped/ended, increment SecondsSurvived variable by ElapsedTime. Then when the player dies, simply use that SecondsSurvived variable as you like. So something like this:
Remember to reset _secondsSurvived to zero everytime the game restarts.