Пример #1
0
 public ShootingComponent(CannonSettings settings, InputHandlingBlocker inputHandlingBlocker,
                          Transform cannonTransform, ExplosionObject explosionObject, IInstantiator instantiator, Image aimImage,
                          AudioSource wickAudio, RandomSoundsPlayer shotSoundsPlayer, UnityEvent onShot)
 {
     _settings             = settings;
     _inputHandlingBlocker = inputHandlingBlocker;
     _cannonTransform      = cannonTransform;
     _shotSoundsPlayer     = shotSoundsPlayer;
     _onShot                 = onShot;
     _reloadComponent        = new ReloadComponent(_settings);
     _powerChargingComponent = new ShotPowerChargingComponent(_settings, aimImage, wickAudio);
     _explosionComponent     = new ExplosionComponent(explosionObject, instantiator, _settings);
 }
Пример #2
0
 public ExplosionComponent(ExplosionObject prefab, IInstantiator instantiator, CannonSettings settings)
 {
     _prefab       = prefab;
     _instantiator = instantiator;
     _settings     = settings;
 }