Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #if (UNITY_IPHONE || UNITY_ANDROID)
- void Update()
- {
- int count = Input.touchCount;
- for (int i = 0; i < count; i++)
- {
- Touch touch = Input.GetTouch(i);
- if (HitTest(touch.position))
- {
- if (touch.phase == TouchPhase.Ended || touch.phase == TouchPhase.Canceled)
- {
- SetButtonTexture(ButtonState.normal);
- }
- else
- {
- SetButtonTexture(ButtonState.armed);
- }
- if (touch.phase == TouchPhase.Began)
- {
- if (touch.tapCount == 1)
- {
- if (messagee != null && message != "")
- {
- messagee.SendMessage(message, this);
- }
- {
- GetComponent("RotateOrbitBheaviour");// I get an error here. It does not compile!
- }
- else if (touch.tapCount == 2)
- {
- if (messagee != null && messageDoubleClick != "")
- {
- messagee.SendMessage(messageDoubleClick, this);
- }
- }
- }
- break;
- }
- }
- }
- #endif
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement