duck

Untitled

Jun 29th, 2010
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //create vars for objects touched
  2. var speed : float = 0.1;
  3. var detectingMotion: boolean;
  4. private var hit: RaycastHit;
  5. private var touchedObject: Transform;
  6. private var xyPlane: Plane;
  7. private var beingDragged : Draggable;
  8. private var trail : Array;
  9.  
  10. function Start()
  11. {
  12.    
  13.    xyPlane = new Plane(Vector3.up, Vector3.zero);
  14. }
  15.  
  16. function Update ()
  17. {  
  18.     if (iPhoneInput.touchCount >= 1)
  19.     {
  20.         touch = iPhoneInput.touch[0];
  21.    
  22.         if (touch.phase == iPhoneTouchPhase.Began)
  23.             {
  24.             ///touch began event
  25.             }
  26.    
  27.         if (touch.phase == iPhoneTouchPhase.Moved && detectingMotion == true)
  28.             {
  29.             ////touch moved event
  30.             }
  31.    
  32.         if (touch.phase == iPhoneTouchPhase.Ended)
  33.             {
  34.             ///touch ended event
  35.             }      
  36.     }  
  37.  
  38. }
Advertisement
Add Comment
Please, Sign In to add comment