fix bullet cannot hit close to tank
This commit is contained in:
parent
6045de0c7d
commit
19e1792307
6 changed files with 30 additions and 39 deletions
|
@ -21,7 +21,15 @@ internal sealed class MapEntityManager(
|
|||
.Concat(PowerUps);
|
||||
|
||||
public void SpawnBullet(Player tankOwner, FloatPosition position, double rotation, bool isExplosive)
|
||||
=> _bullets.Add(new Bullet(tankOwner, position, rotation, isExplosive, DateTime.Now + _bulletTimeout));
|
||||
=> _bullets.Add(new Bullet
|
||||
{
|
||||
Owner = tankOwner,
|
||||
Position = position,
|
||||
Rotation = rotation,
|
||||
IsExplosive = isExplosive,
|
||||
Timeout = DateTime.Now + _bulletTimeout,
|
||||
OwnerCollisionAfter = DateTime.Now + TimeSpan.FromSeconds(1),
|
||||
});
|
||||
|
||||
public void RemoveBulletsWhere(Predicate<Bullet> predicate) => _bullets.RemoveWhere(predicate);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue