Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- foreach(var touchInfo in Touch.GetData (0)){
- //If there's no racket finger ID...
- if(this.finger_ID == 0){
- //If you press and there's no racket finger ID, set the racket finger ID
- if(touchInfo.Status == TouchStatus.Down){
- this.finger_ID = touchInfo.ID;
- break;
- }
- //If the racket has a finger ID...
- }else{
- //If you release the finger, the racket finger ID of the racket will be 0.
- if(touchInfo.Status == TouchStatus.Canceled || touchInfo.Status == TouchStatus.Up){
- this.finger_ID = 0;
- break;
- //If you press and there's no racket finger ID, set the racket finger ID
- }else if(touchInfo.Status == TouchStatus.Down){
- this.finger_ID = touchInfo.ID;
- break;
- //If you move the finger and there's a racket finger ID, just move the racket :)
- }else if(touchInfo.Status == TouchStatus.Move){
- //Move the racket here!!!!!!!!!!!!
- break;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement