驱蚊app
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 
 

58 行
1.3 KiB

  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.UI;
  5. public class UIMainModel : UIBase
  6. {
  7. [SerializeField]
  8. Button StartButton;
  9. [SerializeField]
  10. Button StopButton;
  11. bool _isPlaySound;
  12. string bgmPath;
  13. bool IsPlaySound
  14. {
  15. get { return _isPlaySound; }
  16. set
  17. {
  18. _isPlaySound = value;
  19. if (_isPlaySound)
  20. {
  21. AudioManager.Instance.PlayBGM(bgmPath);
  22. }
  23. else
  24. {
  25. AudioManager.Instance.StopBGM();
  26. }
  27. }
  28. }
  29. public override void OnOpen(params object[] args)
  30. {
  31. int model = (int)args[0];
  32. switch (model)
  33. {
  34. case 0:
  35. bgmPath = "B-2·ÖÖÓ - ºØ, ÍõºØ";
  36. break;
  37. case 1:
  38. bgmPath = "Sinus 2500Hz _ 10dB - Test Tones";
  39. break;
  40. case 2:
  41. bgmPath = "Sinus 6000Hz _ 10dB - Test Tones";
  42. break;
  43. case 3:
  44. bgmPath = "Sinus 8000Hz _ 10dB - Test Tones";
  45. break;
  46. default:
  47. bgmPath = "B-2·ÖÖÓ - ºØ, ÍõºØ";
  48. break;
  49. }
  50. }
  51. public override void OnClose() { }
  52. }