You can try something like that (treat it as pseudocode):
private bool paused;
IEnumerator delay()
{
paused = true;
yield return new WaitForSeconds(x);
paused = false;
}
void Update()
{
if (paused)
{
return;
}
// do something
StartCoroutine(delay);
}
Trending Articles
More Pages to Explore .....