public void Move()
{
Vector2 realPos = pos - org;
bool inTexture = ms.X >= realPos.X && ms.X <= (realPos.X + tex.Width) &&
ms.Y >= realPos.Y && ms.Y <= (realPos.Y + tex.Height);
if (oldMS.LeftButton == ButtonState.Pressed && inTexture)
{
int xDifference = ms.X - oldMS.X;
int yDifference = Y - oldMS.Y;
pos.X += xDifference;
pos.Y += yDifference;
}
oldMS = ms;
}
thanks for any help.
This post has been edited by matanl1234: 22 June 2012 - 05:45 AM

New Topic/Question
Reply


MultiQuote



|