Advertisement
andyshon

Control script

Mar 3rd, 2016
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.59 KB | None | 0 0
  1. using UnityEngine;
  2. using UnityEngine.Events;
  3. using UnityEngine.EventSystems;
  4. using System.Collections;
  5.  
  6. public class Tushkan_class : MonoBehaviour, IPointerDownHandler, IPointerUpHandler
  7. {
  8.     public UnityEvent OnDown;
  9.     public UnityEvent OnUp;
  10.  
  11.     public void OnPointerDown(PointerEventData eventData)
  12.     {
  13.         OnDown.Invoke();
  14.     }
  15.     public void OnPointerUp(PointerEventData eventData)
  16.     {
  17.         OnUp.Invoke();
  18.     }
  19.  
  20.     public void Func1() {
  21.         Debug.LogWarning("funct1");
  22.     }
  23.     public void Func2() {
  24.         Debug.LogWarning("funct2");
  25.     }
  26.  
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement