Advertisement
Guest User

Untitled

a guest
Oct 18th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4.  
  5. public class ClickScript : MonoBehaviour {
  6.  
  7. public static ClickScript Instance { set; get; }
  8.  
  9. public bool tap;
  10.  
  11. private void Awake()
  12. {
  13. Instance = this;
  14. }
  15. // Use this for initialization
  16. void Start () {
  17.  
  18. }
  19.  
  20. // Update is called once per frame
  21. void Update () {
  22.  
  23. tap = false;
  24.  
  25. //mouse input for testing
  26. if (Input.GetMouseButtonDown (0))
  27. {
  28. tap = true;
  29. }
  30. else if (Input.GetMouseButtonUp (0))
  31. {
  32.  
  33. }
  34. }
  35.  
  36.  
  37. public bool Tap
  38. {
  39. get
  40. {
  41. return tap;
  42. }
  43. }
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement