47 lines
1.5 KiB
C#
47 lines
1.5 KiB
C#
![]() |
namespace BlueWater.Uis
|
||
|
{
|
||
|
public class PausePopupUi : PopupUi
|
||
|
{
|
||
|
public override void Open()
|
||
|
{
|
||
|
VisualFeedbackManager.Instance.SetBaseTimeScale(0f);
|
||
|
PopupUiController.RegisterPopup(this);
|
||
|
IsOpened = true;
|
||
|
IsPaused = true;
|
||
|
}
|
||
|
|
||
|
public override void Close()
|
||
|
{
|
||
|
PopupUiController.UnregisterPopup(this);
|
||
|
IsOpened = false;
|
||
|
IsPaused = false;
|
||
|
|
||
|
if (PopupUiController.IsPopupListEmpty() || !PopupUiController.IsPausedPopupList())
|
||
|
{
|
||
|
VisualFeedbackManager.Instance.ResetTimeScale();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public void OpenSwitch(InputActionMaps inputActionMaps)
|
||
|
{
|
||
|
VisualFeedbackManager.Instance.SetBaseTimeScale(0f);
|
||
|
PopupUiController.RegisterPopup(this);
|
||
|
IsOpened = true;
|
||
|
IsPaused = true;
|
||
|
PlayerInputKeyManager.Instance.SwitchCurrentActionMap(inputActionMaps);
|
||
|
}
|
||
|
|
||
|
public void CloseSwitch(InputActionMaps inputActionMaps)
|
||
|
{
|
||
|
PopupUiController.UnregisterPopup(this);
|
||
|
IsOpened = false;
|
||
|
IsPaused = false;
|
||
|
|
||
|
if (PopupUiController.IsPopupListEmpty() || !PopupUiController.IsPausedPopupList())
|
||
|
{
|
||
|
VisualFeedbackManager.Instance.ResetTimeScale();
|
||
|
PlayerInputKeyManager.Instance.SwitchCurrentActionMap(inputActionMaps);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|