- Home /
Player death/ game over c#
Hey I'm a novice at this so please be gentle
I've been looking around and everyone seems to end the game by moving to another scene, I have this working atm but I would like a more Fancy system.
My aim is to once the player dies to phase into an image with some UI text with scores etc and retry button.The problem I'm having is that my carries on running in the background.
Is there a way to stop everything but allow menus to still function? This includes spawning, Gravity, movement and other such things as my score is based on distance travelled.
I did read somewhere about game States but I'm not sure how those work of even if they could help.
Answer by Bioinformatizer · Jul 06, 2015 at 12:52 AM
Try using Time.timeScale
http://docs.unity3d.com/ScriptReference/Time-timeScale.html
Set the function to 0 when you want everything stopped and put it back to 1.0 when you want to get things moving. Also works great as a pause function. Cheers.
So I tried this and the game paused which was great but it stopped the game over animation from running so not sure where to go from here
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
C# issue --- code assistance. 1 Answer
Floating Healthbar Appears when facing opposite direction of enemy 1 Answer