Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ExitShip"/> class.
 /// </summary>
 /// <param name="image">The image.</param>
 /// <param name="tile">The tile.</param>
 public ExitShip(Texture2D image, Tile tile)
 {
     this.position = tile.GetPosition();
     this.image = image;
     this.tile = tile;
     visible = false;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Money"/> class.
 /// </summary>
 /// <param name="image">The image.</param>
 /// <param name="tile">The tile.</param>
 public Money(Texture2D image, Tile tile)
 {
     this.position = tile.GetPosition();
     this.image = image;
     this.tile = tile;
     visible = true;
 }
Ejemplo n.º 3
0
        public float DistanceToTile(Tile tile)
        {
            Vector2 currentPosition = new Vector2(Destination.GetPosition().X, Destination.GetPosition().Y);
            Vector2 testDistance = new Vector2(tile.GetPosition().X, tile.GetPosition().Y);

            return Vector2.Distance(testDistance, currentPosition);
        }