separate folders per functionality
This commit is contained in:
parent
7f00160780
commit
0ca6a91a7e
1 changed files with 60 additions and 113 deletions
|
|
@ -1,19 +0,0 @@
|
|||
using TanksServer.Helpers;
|
||||
using TanksServer.Models;
|
||||
using TanksServer.Services;
|
||||
|
||||
namespace TanksServer.TickSteps;
|
||||
|
||||
internal sealed class CollideBulletsWithMap(BulletManager bullets, MapService map) : ITickStep
|
||||
{
|
||||
public Task TickAsync()
|
||||
{
|
||||
bullets.RemoveWhere(BulletHitsWall);
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
private bool BulletHitsWall(Bullet bullet)
|
||||
{
|
||||
return map.IsCurrentlyWall(bullet.Position.ToPixelPosition().ToTilePosition());
|
||||
}
|
||||
}
|
||||
Reference in a new issue