Super Knight : Enter the Dungeon
 
 
 
 
sked/Assets/Script/UI/TimeStop.cs

19 lines
331 B

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class TimeStop : MonoBehaviour
{
private void OnEnable()
{
Time.timeScale = 0;
}
private void OnDisable()
{
Time.timeScale = 1;
}
private void OnDestroy()
{
Time.timeScale = 1;
}
}