Skip to content
Snippets Groups Projects
TimeStop.cs 558 B
Newer Older
  • Learn to ignore specific revisions
  • using UnityEngine;
    
    /*
      https://gamedevbeginner.com/the-right-way-to-pause-the-game-in-unity/#:~:text=The%20most%20convenient%20method%20for%20pausing%20the%20game,will%20return%20the%20game%20to%20its%20normal%20speed.
    */
    
    
    MaZiFAU's avatar
    MaZiFAU committed
    public class TimeStop : MonoBehaviour
    
    {
        public bool checkTimeToStop;
    
    
        void Start()
        {
            PauseGame();
        }
    
        private void Update()
        {
    
            if (checkTimeToStop == true)
    
    MaZiFAU's avatar
    MaZiFAU committed
            UIconfig.GamePaused = true;