using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class UIMainModel : UIBase { [SerializeField] Button StartButton; [SerializeField] Button StopButton; bool _isPlaySound; string bgmPath; bool IsPlaySound { get { return _isPlaySound; } set { _isPlaySound = value; if (_isPlaySound) { AudioManager.Instance.PlayBGM(bgmPath); } else { AudioManager.Instance.StopBGM(); } } } public override void OnOpen(params object[] args) { int model = (int)args[0]; switch (model) { case 0: bgmPath = "bgm_main"; break; case 1: bgmPath = "bgm_main_2"; break; case 2: bgmPath = "bgm_main_3"; break; case 3: bgmPath = "bgm_main_3"; break; default: bgmPath = "bgm_main"; break; } } public override void OnClose() { } }