improve ByteChannelWebSocket

This commit is contained in:
Vinzenz Schroeter 2024-04-13 12:33:08 +02:00
parent de3d298475
commit 40eba7a7c7
5 changed files with 79 additions and 111 deletions

View file

@ -14,8 +14,8 @@ internal sealed class MoveBullets(BulletManager bullets, IOptions<TanksConfigura
{
var angle = bullet.Rotation * 2 * Math.PI;
bullet.Position = new FloatPosition(
x: bullet.Position.X + Math.Sin(angle) * config.Value.BulletSpeed,
y: bullet.Position.Y - Math.Cos(angle) * config.Value.BulletSpeed
bullet.Position.X + Math.Sin(angle) * config.Value.BulletSpeed,
bullet.Position.Y - Math.Cos(angle) * config.Value.BulletSpeed
);
}
}