Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2014
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. #if (UNITY_IPHONE || UNITY_ANDROID)
  2. void Update()
  3. {
  4. int count = Input.touchCount;
  5. for (int i = 0; i < count; i++)
  6. {
  7. Touch touch = Input.GetTouch(i);
  8. if (HitTest(touch.position))
  9. {
  10. if (touch.phase == TouchPhase.Ended || touch.phase == TouchPhase.Canceled)
  11. {
  12. SetButtonTexture(ButtonState.normal);
  13. }
  14. else
  15. {
  16. SetButtonTexture(ButtonState.armed);
  17. }
  18. if (touch.phase == TouchPhase.Began)
  19. {
  20. if (touch.tapCount == 1)
  21. {
  22. if (messagee != null && message != "")
  23. {
  24. messagee.SendMessage(message, this);
  25. }
  26.  
  27. {
  28. GetComponent("RotateOrbitBheaviour");// I get an error here. It does not compile!
  29. }
  30. else if (touch.tapCount == 2)
  31. {
  32. if (messagee != null && messageDoubleClick != "")
  33. {
  34. messagee.SendMessage(messageDoubleClick, this);
  35. }
  36. }
  37. }
  38. break;
  39. }
  40. }
  41. }
  42. #endif
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement