initial commit

This commit is contained in:
cblech
2025-01-04 13:29:07 +01:00
commit 22f67f4347
124 changed files with 12157 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
using System;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.EventSystems;
[RequireComponent(typeof(OutlineFx.OutlineFx))]
public class MyButton : MonoBehaviour, IPointerClickHandler, IPointerEnterHandler, IPointerExitHandler
{
[SerializeField]
private UnityEvent _onClick;
// references
private OutlineFx.OutlineFx _outlineFx;
private void Awake()
{
_outlineFx = GetComponent<OutlineFx.OutlineFx>();
}
public void OnPointerClick(PointerEventData eventData)
{
_onClick.Invoke();
}
public void OnPointerEnter(PointerEventData eventData)
{
_outlineFx.enabled = true;
}
public void OnPointerExit(PointerEventData eventData)
{
_outlineFx.enabled = false;
}
}