I wanna restart the scene , I have a countdown timer in there. I've tried to LoadScene()
but the countdown timer is still in the current time before I restart the scene
{
TheTimer();
if (stoptimer == true)
{
GetComponent<RandomSpawner>().enabled = false;
textPoin.text = "Total Poin: " + playerObj.GetComponent<Player>().point.ToString();
playerObj.GetComponent<Player>().enabled = false;
Destroy(spawnHereObject);
panelEnd.SetActive(true);
}
}
我发现了我的问题,这只是因为在 Update Function 上并使用 Time.time 而不是 Time.realtimeSinceStartup
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.