11 lines
252 B
C#
11 lines
252 B
C#
using UnityEngine;
|
|
|
|
//Could be a singleton
|
|
public class GameFlowManager : MonoBehaviour {
|
|
[field: SerializeField] public bool Paused { get; private set; } = true;
|
|
|
|
void SetPause(bool value) {
|
|
Paused = value;
|
|
Time.timeScale = value ? 0f : 1f;
|
|
}
|
|
} |