Advertisement
baldio99codderboi

Untitled

Jul 29th, 2022
1,567
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. using System;
  2. using System.Collections;
  3. using UnityEngine;
  4.  
  5. // Token: 0x020000DA RID: 218
  6. public class ExitButtonScript : MonoBehaviour
  7. {
  8. // Token: 0x060009CB RID: 2507
  9. public void ExitGame()
  10. {
  11. base.StopAllCoroutines();
  12. base.StartCoroutine(this.ExitTimer());
  13. }
  14.  
  15. // Token: 0x06000DE5 RID: 3557
  16. private void Start()
  17. {
  18. this.player = base.gameObject.AddComponent<AudioSource>();
  19. }
  20.  
  21. // Token: 0x06000DE7 RID: 3559
  22. private IEnumerator ExitTimer()
  23. {
  24. this.player.Stop();
  25. this.player.PlayOneShot(ModExtraAssets.Get<AudioClip>("BAL_ThanksForPlaying"));
  26. yield return new WaitWhile(() => this.player.isPlaying);
  27. Application.Quit();
  28. yield break;
  29. }
  30.  
  31. // Token: 0x04000DAF RID: 3503
  32. private AudioSource player;
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement