[quote=Rockman87;257171]
Code:
personPos.Y += (int)((gamepadStatus.ThumbSticks.Left.Y * 5) * -1);
if ((int)((gamepadStatus.ThumbSticks.Left.Y * 5) * -1) < 0)
{
.
.
.
I think in your code its not very important, but never do the same calculations more than once if not needed.
Store the value instead.
In addition, why do you add a value to personPos.Y and negate it by multiplying with -1? You could better subtract it from the beginning. It would be the same...
Applying these things, the code should rather look like:
Code:
int TmpValue = (int)(gamepadStatus.ThumbSticks.Left.Y * 5);
personPos.Y -= TmpValue;
if (TmpValue < 0)
{
.
.
.