Exemplo n.º 1
0
 public static void DestroySoundPlay()
 {
     if (GameState.IsSoundOn)
     {
         DestroyAudio.Play();
     }
 }
 private void Awake()
 {
     if (instance != null)
     {
         Destroy(gameObject);
     }
     else
     {
         instance = this;
         GameObject.DontDestroyOnLoad(transform.gameObject);
     }
 }