mirror of
https://github.com/FriendshipIsEpic/FiE-Game.git
synced 2024-11-23 22:27:58 +01:00
27 lines
534 B
C#
27 lines
534 B
C#
using Fie.Manager;
|
|
using UnityEngine;
|
|
|
|
namespace Fie.UI
|
|
{
|
|
public class FieUIGamePadEventSender : MonoBehaviour
|
|
{
|
|
[SerializeField]
|
|
private FieInputManager.FieInputUIKeyType keyType;
|
|
|
|
[SerializeField]
|
|
private FieUIMouseEvent uiElement;
|
|
|
|
private void Start()
|
|
{
|
|
FieManagerBehaviour<FieInputManager>.I.uiInputEvent += I_uiInputEvent;
|
|
}
|
|
|
|
private void I_uiInputEvent(FieInputManager.FieInputUIKeyType keyType)
|
|
{
|
|
if ((keyType & this.keyType) == this.keyType)
|
|
{
|
|
uiElement.ExecuteGamepadDecide();
|
|
}
|
|
}
|
|
}
|
|
}
|