You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
407 B
C#
20 lines
407 B
C#
using UltEvents;
|
|
using UnityEngine;
|
|
|
|
namespace D2D.Common
|
|
{
|
|
public class DoActionOnTap : MonoBehaviour
|
|
{
|
|
[SerializeField] private UltEvent action;
|
|
|
|
private void Update()
|
|
{
|
|
foreach (Touch touch in Input.touches)
|
|
{
|
|
if (Input.GetTouch(0).phase == TouchPhase.Began)
|
|
action?.Invoke();
|
|
}
|
|
}
|
|
}
|
|
}
|