This repository has been archived on 2026-07-13. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
servicepoint-tanks/tanks-backend/TanksServer/Graphics/DrawBulletsStep.cs
2024-04-21 14:32:29 +02:00

16 lines
493 B
C#

using TanksServer.GameLogic;
namespace TanksServer.Graphics;
internal sealed class DrawBulletsStep(MapEntityManager entityManager) : IDrawStep
{
public void Draw(GamePixelGrid pixels)
{
foreach (var bullet in entityManager.Bullets)
{
var position = bullet.Position.ToPixelPosition();
pixels[position.X, position.Y].EntityType = GamePixelEntityType.Bullet;
pixels[position.X, position.Y].BelongsTo = bullet.Owner;
}
}
}