/**************************************************************************** * 2024.9 CHIVA ****************************************************************************/ using System; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using QFramework; namespace QFramework { public partial class StudyPanel : UIElement { public bool isPause = false; private void Awake() { PlayBtn.onClick.AddListener(() => { SoundManager.Instance.RePlay(); Time.timeScale = 1; PlayBtn.gameObject.SetActive(false); PauseBtn.gameObject.SetActive(true); isPause = false; }); PauseBtn.onClick.AddListener(() => { SoundManager.Instance.Pause(); Time.timeScale = 0; PlayBtn.gameObject.SetActive(true); PauseBtn.gameObject.SetActive(false); isPause = true; }); } public void Play() { SoundManager.Instance.RePlay(); Time.timeScale = 1; PlayBtn.gameObject.SetActive(false); PauseBtn.gameObject.SetActive(true); isPause = false; } protected override void OnBeforeDestroy() { } } }