Пример #1
0
 public void Draw(SpriteBatch spriteBatch, Field field = null)
 {
     if (Position != null)
     {
         spriteBatch.Draw(ImageProvider.Instance.GetImage(GetMapToken()), GameCamera.Instance.GetMovedVector(Position.GetVector()));
     }
     else if (field != null)
     {
         spriteBatch.Draw(ImageProvider.Instance.GetOpaqueImage(GetMapToken(), 100), GameCamera.Instance.GetMovedVector(field.GetVector()));
     }
 }
Пример #2
0
 public int DistanceFrom(Field field)
 {
     return (int)Vector2.Distance(GetVector(), field.GetVector()) / 64;
 }