Tanoda
ShowSelection.cs
Go to the documentation of this file.
1using System.Collections;
2using System.Collections.Generic;
3using UnityEngine;
5
6public class ShowSelection : MonoBehaviour , IPointerEnterHandler, IPointerExitHandler
7{
8 internal string actionName;
9 // Start is called before the first frame update
10 void Start()
11 {
12
13 }
14
15 // Update is called once per frame
16 void Update()
17 {
18
19 }
20
21 public void OnPointerEnter(PointerEventData eventData)
22 {
23 if (actionName!=null)
24 {
25 var action = Controller.Instance.GetActionById(actionName);
26 action.OnPointerEnter(eventData);
27 }
28 }
29
30 public void OnPointerExit(PointerEventData eventData)
31 {
32 if (actionName != null)
33 {
34 var action = Controller.Instance.GetActionById(actionName);
35 action.OnPointerExit(eventData);
36 }
37 }
38
39}
virtual void OnPointerEnter(PointerEventData eventData)
virtual void OnPointerExit(PointerEventData eventData)
ActionObject GetActionById(string id)
Definition: Controller.cs:950
static Controller Instance
Definition: Controller.cs:16
void OnPointerEnter(PointerEventData eventData)
void OnPointerExit(PointerEventData eventData)