コード例 #1
0
 /// <summary>
 /// The player position should be defined as the bottom of the sprite in the middle.
 /// </summary>
 /// <param name="position"></param>
 internal void SetPosition(Point position)
 {
     // floor position so at least if pixel resolution matches the won't wobble.
     _sprite.SetPosition(Math.Floor(position.X), Math.Floor(position.Y + _sprite.GetHeight() / 2));
 }