SHARE
TWEET

Untitled

a guest Feb 20th, 2020 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using UnityEngine;
  2. using System.Collections;
  3. using UnityEngine.EventSystems;
  4. using System;
  5.  
  6. public class DragDopSkripts : MonoBehaviour, IBeginDragHandler, IPointerDownHandler, IEndDragHandler, IDragHandler
  7. {
  8.     public Object objektuSkripts;
  9.     private CanvasGroup kanvasGrupa;
  10.     private RectTransform velkObjRectTransform;
  11.  
  12.     void Awake(){
  13.         kanvasGrupa = GetComponent<CanvasGroup>();
  14.         velkObjRectTransform = GetComponent<RectTransform>();
  15.     }
  16.     private void OnPointerDown(PointerEventData notikums)
  17.     {
  18.         Debug.Log("Uzkliskinats uz velkama obj");
  19.     }
  20.     private void OnBeginDrag(PointerEventData notikums)
  21.     {
  22.         Debug.Log("uzsakta obj vilksana");
  23.     }
  24.     private void OnMouseDrag(PointerEventData notikums)
  25.     {
  26.         Debug.Log("notiek Vilksana");
  27.     }
  28.     private void OnEndDrag(PointerEventData notikums)
  29.     {
  30.         Debug.Log("objekts ir nomests");
  31.     }
  32.  
  33.     void IBeginDragHandler.OnBeginDrag(PointerEventData eventData)
  34.     {
  35.         throw new NotImplementedException();
  36.     }
  37.  
  38.     void IPointerDownHandler.OnPointerDown(PointerEventData eventData)
  39.     {
  40.         throw new NotImplementedException();
  41.     }
  42. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top