考虑这两个声明:
compile 'com.facebook.android:facebook-android-sdk:4.+'
两种情况下的结果都是 public void Update(MouseState mouse, GameTime gameTime,Matrix matrix)
{
if (mouse.LeftButton == ButtonState.Pressed)
{
mousePos = new Vector2(mouse.X, mouse.Y);
Vector2.Transform(mousePos, matrix);
oldPos = testObjPos;
Vector2.Transform(oldPos, matrix);
Difference = mousePos - oldPos;
Difference.Normalize();
}
testObjPos += Difference * (float)gameTime.ElapsedGameTime.TotalSeconds * 20;
if (testObjPos.X > mousePos.X - 1 && testObjPos.X < mousePos.X + 1 &&
testObjPos.Y > mousePos.Y - 1 && testObjPos.Y < mousePos.Y + 1)
Difference = new Vector2(0, 0);
}
。那有什么区别?