add explosive bullet power up
This commit is contained in:
parent
3f4a301993
commit
a2d46bda92
1 changed files with 407 additions and 253 deletions
|
|
@ -1,4 +1,5 @@
|
|||
using System.Diagnostics;
|
||||
using TanksServer.GameLogic;
|
||||
|
||||
namespace TanksServer.Models;
|
||||
|
||||
|
|
@ -25,16 +26,9 @@ internal sealed class Tank(Player player, FloatPosition spawnPosition) : IMapEnt
|
|||
|
||||
public FloatPosition Position { get; set; } = spawnPosition;
|
||||
|
||||
public PixelBounds Bounds => GetBoundsForCenter(Position);
|
||||
public PixelBounds Bounds => Position.GetBoundsForCenter(MapService.TileSize);
|
||||
|
||||
public int Orientation => (int)Math.Round(Rotation * 16) % 16;
|
||||
|
||||
public static PixelBounds GetBoundsForCenter(FloatPosition position)
|
||||
{
|
||||
var pixelPosition = position.ToPixelPosition();
|
||||
return new PixelBounds(
|
||||
pixelPosition.GetPixelRelative(-4, -4),
|
||||
pixelPosition.GetPixelRelative(3, 3)
|
||||
);
|
||||
}
|
||||
public byte ExplosiveBullets { get; set; }
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue