2021-09-06 16:53:48 +08:00
|
|
|
|
using System.Collections;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
using UnityEngine.EventSystems;
|
|
|
|
|
|
using UnityEngine.UI;
|
|
|
|
|
|
|
|
|
|
|
|
public class BigLeftController : MonoBehaviour
|
|
|
|
|
|
{
|
|
|
|
|
|
public void OnPointerClick()
|
|
|
|
|
|
{
|
|
|
|
|
|
RouteItem route = transform.parent.GetComponent<RouteItem>();
|
|
|
|
|
|
if (route.enter)
|
|
|
|
|
|
{
|
|
|
|
|
|
route.OnPointerExit(null);
|
|
|
|
|
|
}
|
2021-09-23 18:14:53 +08:00
|
|
|
|
else
|
2021-09-06 16:53:48 +08:00
|
|
|
|
{
|
|
|
|
|
|
route.OnPointerEnter(null);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//public void OnPointerEnter(PointerEventData eventData)
|
|
|
|
|
|
//{
|
|
|
|
|
|
// transform.parent.GetComponent<RouteItem>().OnPointerEnter(eventData);
|
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
|
|
//public void OnPointerExit(PointerEventData eventData)
|
|
|
|
|
|
//{
|
|
|
|
|
|
// transform.parent.GetComponent<RouteItem>().OnPointerExit(eventData);
|
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
|
|
// Start is called before the first frame update
|
|
|
|
|
|
void Start()
|
|
|
|
|
|
{
|
|
|
|
|
|
transform.GetComponent<Button>().onClick.AddListener(() =>
|
|
|
|
|
|
{
|
|
|
|
|
|
OnPointerClick();
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Update is called once per frame
|
|
|
|
|
|
void Update()
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|