2021-08-26 22:36:18 +02:00
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
using UnityEngine.Events;
|
|
|
|
|
|
|
|
|
|
|
|
public class PromptsInput : MonoBehaviour
|
|
|
|
|
|
{
|
2022-09-22 19:17:03 +03:00
|
|
|
|
[SerializeField] private PauseMenu _pauseMenu = default;
|
|
|
|
|
|
[SerializeField] private InputManager _inputManager = default;
|
|
|
|
|
|
public UnityEvent OnConfirm;
|
|
|
|
|
|
public UnityEvent OnBack;
|
|
|
|
|
|
public UnityEvent OnCoop;
|
|
|
|
|
|
public UnityEvent OnRebind;
|
|
|
|
|
|
public UnityEvent OnStage;
|
|
|
|
|
|
public UnityEvent OnControls;
|
|
|
|
|
|
public UnityEvent OnToggleFramedata;
|
|
|
|
|
|
public UnityEvent OnLeftPage;
|
|
|
|
|
|
public UnityEvent OnRightPage;
|
2022-10-17 19:11:28 +02:00
|
|
|
|
public UnityEvent OnLeftNavigation;
|
|
|
|
|
|
public UnityEvent OnRightNavigation;
|
2023-08-29 17:42:32 +03:00
|
|
|
|
public UnityEvent OnOptions;
|
2021-08-26 22:36:18 +02:00
|
|
|
|
|
2022-09-22 19:17:03 +03:00
|
|
|
|
void OnEnable()
|
|
|
|
|
|
{
|
|
|
|
|
|
if (_inputManager != null)
|
2023-08-29 17:42:32 +03:00
|
|
|
|
_inputManager.SetPrompts(this);
|
2022-09-22 19:17:03 +03:00
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
if (_pauseMenu != null)
|
2022-12-04 21:35:31 +02:00
|
|
|
|
GameplayManager.Instance.PauseMenu.PlayerInput.GetComponent<PlayerController>().CurrentPrompts = GetComponent<PromptsInput>();
|
2022-09-22 19:17:03 +03:00
|
|
|
|
else
|
2022-12-04 21:35:31 +02:00
|
|
|
|
GameplayManager.Instance.PlayerOne.GetComponent<PlayerController>().CurrentPrompts = GetComponent<PromptsInput>();
|
2022-09-22 19:17:03 +03:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2022-08-30 22:54:45 +03:00
|
|
|
|
|
2022-08-08 15:55:27 +03:00
|
|
|
|
}
|