|
  
|
|
|||||||
| Development Discussions All developers who are coding games may stop by here for any help, suggestions, and everything development related. |
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 (permalink) |
|
Support Team
Expert Zuner Join Date: Nov 2007
Posts: 2,890
Reputation: 178
Donate |
I know someone posted something about this before, but I couldn't find it. I was just wondering, is there a simple way to change a game to touch.. Basically, whre in the code do I go to change to touch, and what do I edit?
__________________
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts. To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts. To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts. ![]() ![]() |
|
|
|
| Remove Advertisements Sponsored Links | |
Advertisement |
|
|
|
#2 (permalink) |
|
Zuner
Join Date: May 2008
Posts: 64
Reputation: 11
Donate |
I actually think touch is easier to implement. The methods (I cant recall exactly what, but something like GamePad.GetState(Player.One).....YThumbstick & xthumbsitck) each return a number between -1 and 1 (-1 is completely down or left, 1 is all the way up or right). So lets say you move something based on the Y, and it happens to be a paddle. You would say something like;
paddle.Ypos += GamePad....Ythumstick * 5f, or some factor. Sorry, im not on my PC so i cant give you exact code. If you have anymore questions feel free to ask. Also, the 3.0 came with a little bit of documentation about this under "Zune programming considerations". ![]() |
|
|
|
|
|
#3 (permalink) |
|
Experienced Zuner
Join Date: May 2008
Posts: 114
Reputation: 22
Donate |
Touch == Left Thumbstick
Click == DPad
__________________
John Sedlak Microsoft Xna / DirectX MVP To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts. |
|
|
|
![]() |
| Thread Tools | |
|
|
| |