private void OnShootPuckEvent(System.Object sender, ShootPuckArgs args) { PlayRandomSound(sender, _puckSlapSounds); ShootPuckEvent.Raise(sender, args); _player.ListenToShot(args.Puck); }
private void Update() { _timer -= Time.deltaTime; if (_timer <= 0) { Shooter randomShooter = GetRandomShooter(); Puck nextPuck = GetNextPuck(); randomShooter.AddToShootQueue(nextPuck); randomShooter.Shoot(); ShootPuckEvent.Raise <ShootPuckArgs>(randomShooter, new ShootPuckArgs(nextPuck)); _timer = _shootInterval; } }
private void OnShootPuckEvent(System.Object sender, EventArgs args) { TotalShots++; ShootPuckEvent.Raise(sender, args); }