separate tick steps
This commit is contained in:
parent
898a9cedc1
commit
a9aaf899a2
1 changed files with 238 additions and 193 deletions
15
TanksServer/TickSteps/CollideBulletsWithTanks.cs
Normal file
15
TanksServer/TickSteps/CollideBulletsWithTanks.cs
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
namespace TanksServer.TickSteps;
|
||||
|
||||
internal sealed class CollideBulletsWithTanks(BulletManager bullets) : ITickStep
|
||||
{
|
||||
public Task TickAsync()
|
||||
{
|
||||
bullets.RemoveWhere(BulletHitsTank);
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
private bool BulletHitsTank(Bullet bullet)
|
||||
{
|
||||
return false; // TODO
|
||||
}
|
||||
}
|
||||
Reference in a new issue