您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
37 行
1.1 KiB
37 行
1.1 KiB
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
public class UIPauseScreenSetter : MonoBehaviour
|
|
{
|
|
[SerializeField] private UIButtonSetter _unpauseButton = default;
|
|
[SerializeField] private UIButtonSetter _settingsButton = default;
|
|
[SerializeField] private UIButtonSetter _backToMenuButton = default;
|
|
[SerializeField] private Button _closeButton = default;
|
|
[SerializeField] private VoidEventChannelSO _clickUnpauseEvent = default;
|
|
[SerializeField] private VoidEventChannelSO _clickSettingsEvent = default;
|
|
[SerializeField] private VoidEventChannelSO _clickBackToMenuEvent = default;
|
|
|
|
[SerializeField] private InputReader _inputReader = default;
|
|
|
|
private void Start()
|
|
{
|
|
_closeButton.onClick.RemoveAllListeners();
|
|
_closeButton.onClick.AddListener(() => { _clickUnpauseEvent.RaiseEvent(); });
|
|
_inputReader.closePopupEvent += _clickUnpauseEvent.RaiseEvent;
|
|
|
|
}
|
|
|
|
public void SetPauseScreen()
|
|
{
|
|
|
|
_unpauseButton.SetButton(_clickUnpauseEvent, true);
|
|
|
|
_settingsButton.SetButton(_clickSettingsEvent, false);
|
|
|
|
_backToMenuButton.SetButton(_clickBackToMenuEvent, false);
|
|
|
|
}
|
|
|
|
|
|
}
|