48 lines
1.2 KiB
C#
48 lines
1.2 KiB
C#
|
|
using System;
|
||
|
|
using Core;
|
||
|
|
using Script.Gameplay.Global;
|
||
|
|
using TMPro;
|
||
|
|
using UnityEngine;
|
||
|
|
using Script.Gameplay.Input;
|
||
|
|
|
||
|
|
namespace UI
|
||
|
|
{
|
||
|
|
public class SettingViewer : UIBase
|
||
|
|
{
|
||
|
|
[SerializeField] private TMP_Text TitleText;
|
||
|
|
[SerializeField] private TMP_Text ContentText;
|
||
|
|
|
||
|
|
private InputManager inputManager;
|
||
|
|
protected override void Awake()
|
||
|
|
{
|
||
|
|
base.Awake();
|
||
|
|
inputManager = InputManager.Instance;
|
||
|
|
inputManager.Input.Player.Setting.performed+= ctx =>
|
||
|
|
{
|
||
|
|
if (!isActiveAndEnabled)
|
||
|
|
{
|
||
|
|
Show();
|
||
|
|
inputManager.SetInputForLook(false);
|
||
|
|
inputManager.SetInputForMove(false);
|
||
|
|
}
|
||
|
|
else
|
||
|
|
{
|
||
|
|
Hide();
|
||
|
|
inputManager.SetInputForLook(true);
|
||
|
|
inputManager.SetInputForMove(true);
|
||
|
|
}
|
||
|
|
};
|
||
|
|
}
|
||
|
|
|
||
|
|
public override void Show()
|
||
|
|
{
|
||
|
|
base.Show();
|
||
|
|
ContentText.text = "循环次数:" + GameDataManager.Instance.TotalLoopCount.ToString();
|
||
|
|
}
|
||
|
|
|
||
|
|
public override void Hide()
|
||
|
|
{
|
||
|
|
base.Hide();
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|