private void OnPlayerShootedEvent(PlayerShootModel model) { this.Invoke(new Action(() => { _bullets.Add(new Bullet(_tanks[model.PlayerMatchId], model.Angle, model.Speed, model.AirSpeed, model.Mass, model.Gravity, -1, true) { Origin = new Vector2f(2f, 2f), Position = new Vector2f(model.X, model.Y), FillColor = Color.Black, Radius = 4, }); })); }
private async Task Shoot(PlayerShootModel model) { await gameHub.Invoke("Shoot", model); }
public void Shoot(PlayerShootModel model) { Clients.OthersInGroup($"{model.RoomId}").PlayerShooted(model); }