Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private var draggedObject : Draggable;
- function Update ()
- {
- if (iPhoneInput.touchCount >= 1)
- {
- touch = iPhoneInput.touch[0];
- if (touch.phase == iPhoneTouchPhase.Began)
- {
- // determine whether a draggable object was touched,
- // if so, put it in "draggedObject"
- }
- if (touch.phase == iPhoneTouchPhase.Moved && detectingMotion == true)
- {
- // if currently dragging an object, send the current point to the object
- // (so the object adds it to its own internal array of points to move through)
- }
- if (touch.phase == iPhoneTouchPhase.Ended)
- {
- draggedObject = null;
- }
- }
- }
Add Comment
Please, Sign In to add comment