26 lines
714 B
C#
26 lines
714 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
using UnityEngine.EventSystems;
|
|
|
|
public class TechTreeButtonAnimator : MonoBehaviour, IPointerDownHandler, IPointerUpHandler
|
|
{
|
|
public GameObject background;
|
|
// Start is called before the first frame update
|
|
void Start()
|
|
{
|
|
//this.GetComponent<Button>().onClick.AddListener(OnTechTreeButtonClicked);
|
|
}
|
|
|
|
public void OnPointerDown(PointerEventData eventData)
|
|
{
|
|
background.GetComponent<Animator>().SetTrigger("OnPointerDown");
|
|
}
|
|
|
|
public void OnPointerUp(PointerEventData eventData)
|
|
{
|
|
background.GetComponent<Animator>().SetTrigger("OnPointerUp");
|
|
}
|
|
}
|