respawn, fix hit box off by half tile
This commit is contained in:
parent
3c9192ab3a
commit
a89392beb8
2 changed files with 10 additions and 7 deletions
|
@ -25,10 +25,9 @@ internal sealed class Tank(Player player, FloatPosition spawnPosition)
|
|||
|
||||
public (FloatPosition TopLeft, FloatPosition BottomRight) GetBounds()
|
||||
{
|
||||
const int halfTile = MapService.TileSize / 2;
|
||||
return (
|
||||
new FloatPosition(Position.X - halfTile, Position.Y - halfTile),
|
||||
new FloatPosition(Position.X + halfTile, Position.Y + halfTile)
|
||||
Position,
|
||||
new FloatPosition(Position.X + MapService.TileSize , Position.Y + MapService.TileSize )
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue