-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathClickEventTrigger.cs
59 lines (39 loc) · 1.34 KB
/
ClickEventTrigger.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#region Header
/* ============================================
* Author : Strix
* Initial Creation Date : 2020-02-21
* Summary :
* Template : For Unity Editor V1
============================================ */
#endregion Header
using UnityEngine;
using UnityEngine.EventSystems;
using System.Collections;
using System.Collections.Generic;
using UnityEngine.Events;
/// <summary>
///
/// </summary>
public class ClickEventTrigger : MonoBehaviour, IPointerClickHandler
{
/* const & readonly declaration */
/* enum & struct declaration */
/* public - Field declaration */
public bool bDebugMode = true;
public UnityEvent OnClick;
/* protected & private - Field declaration */
// ========================================================================== //
/* public - [Do~Something] Function */
// ========================================================================== //
/* protected - [Override & Unity API] */
public void OnPointerClick(PointerEventData eventData)
{
if (bDebugMode)
Debug.Log($"{name} - {nameof(OnPointerClick)}", this);
OnClick.Invoke();
}
/* protected - [abstract & virtual] */
// ========================================================================== //
#region Private
#endregion Private}
}