Bagaimana Jeda Persatuan Game Anda
using UnityEngine;
void Pause()
{
Time.timeScale = 0;
}
void Unpause()
{
Time.timeScale = 1;
}
DatMAD
using UnityEngine;
void Pause()
{
Time.timeScale = 0;
}
void Unpause()
{
Time.timeScale = 1;
}
if(Pause){
Time.timeScale = 0;
}
else{
Time.timeScale = 1;
}
Physics.autoSimulation = false;
void PauseGame ()
{
Time.timeScale = 0f;
AudioListener.pause = true;
}
void ResumeGame ()
{
Time.timeScale = 1;
AudioListener.pause = false;
}Copy
Time.timeScale = 0.0f;