123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- /****************************************************************************
- * 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()
- {
- }
- }
- }
|