- Home /
want to see the other side of card image when i moving to the corner of the canvas???????????
hi.... i am developing card game for displaying the value of the card with on drag function.when i drag the back side of card image to any corner or side of the canvas i want to display the front side of card image.This is my code.
using UnityEngine; using UnityEngine.UI; using System.Collections; using UnityEngine.EventSystems;
public class draggable : MonoBehaviour, IBeginDragHandler, IDragHandler, IEndDragHandler { public void OnBeginDrag(PointerEventData eventData) { Debug.Log("OnBeginDrag"); } public void OnDrag(PointerEventData eventData) { Debug.Log("OnDrag"); transform.position = Input.mousePosition; } public void OnEndDrag(PointerEventData eventData) { Debug.Log("OnEndDrag"); } }
Comment