Created
July 25, 2016 00:07
-
-
Save gegagome/585e8cdd03846239ac43a11096454af6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using UnityEngine.EventSystems; | |
public class GraphicForLetters : MonoBehaviour, IPointerClickHandler, IPointerDownHandler, IPointerUpHandler { | |
void Awake () { | |
SpriteRenderer spriteRenderer = GetComponent<SpriteRenderer>(); | |
spriteRenderer.sortingOrder = 3; | |
} | |
public void OnPointerDown(PointerEventData eventData) { | |
Debug.Log(eventData.pointerPress.name); | |
} | |
public void OnPointerUp(PointerEventData eventData) { | |
Debug.Log(eventData.pointerPress.name); | |
Debug.Log("....."); | |
} | |
public void OnPointerClick(PointerEventData eventData) { | |
Debug.Log("hhhh"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment