Пример #1
0
    private void OnShootPuckEvent(System.Object sender, ShootPuckArgs args)
    {
        PlayRandomSound(sender, _puckSlapSounds);

        ShootPuckEvent.Raise(sender, args);

        _player.ListenToShot(args.Puck);
    }
Пример #2
0
 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;
     }
 }
Пример #3
0
 private void OnShootPuckEvent(System.Object sender, EventArgs args)
 {
     TotalShots++;
     ShootPuckEvent.Raise(sender, args);
 }