- Home /
how to record best times on my racing game
i want to be one step ahead of everyone else with my racing game and i know i use playerprefs to store the time at the end of the race but i cant figure it out and if i can get the best times for the races that would give me a serious edge and i will win the contest
Comment
Answer by Nido · May 05, 2016 at 02:08 PM
What is the problem with this? At the end of the race you just need to compare the new time with the one stored in PlayerPrefs. If it's less, store the new value.
if (lastTime < PlayerPrefs.GetFloat("bestTime"))
{
PlayerPrefs.SetFloat("bestTime", lastTime);
}
Your answer
Follow this Question
Related Questions
arcade racing game time limit with time extensions 1 Answer
How to make a timer read to the .001 of a second 2 Answers
Problem Min and Max Time 1 Answer
fuel compsumation 0 Answers
Force mode and delta timing 1 Answer