Advertisement
xerpi

TouchShit

Apr 23rd, 2012
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.98 KB | None | 0 0
  1. foreach(var touchInfo in Touch.GetData (0)){
  2.                 //If there's no racket finger ID...
  3.                     if(this.finger_ID == 0){
  4.                         //If you press and there's no racket finger ID, set the racket finger ID
  5.                             if(touchInfo.Status == TouchStatus.Down){
  6.                                 this.finger_ID = touchInfo.ID;
  7.                                 break;
  8.                             }
  9.                  //If the racket has a finger ID...
  10.                     }else{
  11.                         //If you release the finger, the racket finger ID of the racket will be 0.
  12.                             if(touchInfo.Status == TouchStatus.Canceled || touchInfo.Status == TouchStatus.Up){
  13.                                 this.finger_ID = 0;
  14.                                 break;
  15.                         //If you press and there's no racket finger ID, set the racket finger ID
  16.                             }else if(touchInfo.Status == TouchStatus.Down){
  17.                                 this.finger_ID = touchInfo.ID;
  18.                                 break;
  19.                         //If you move the finger and there's a racket finger ID, just move the racket :)
  20.                             }else if(touchInfo.Status == TouchStatus.Move){
  21.                                 //Move the racket here!!!!!!!!!!!!
  22.                                 break;
  23.                             }
  24.                     }
  25.                 }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement