Пример #1
0
 public ShipWeaponController(IShip ship, Transform bullet, Transform barrel, float bulletSpeed)
 {
     _upTimer         = new UpTimer(0.0f, 3.0f);
     _weaponLocker    = new ShipWeaponLocker(false);
     _bulletManager   = new BulletManager(bullet, barrel, bulletSpeed, _weaponLocker);
     ship.ShipAction += ShouldContinueShooting;
 }
Пример #2
0
 public BulletManager(Transform bullet, Transform barrel, float bulletSpeed, ShipWeaponLocker weaponLocker)
 {
     _barrel        = barrel;
     _bulletSpeed   = bulletSpeed;
     _fire          = new PCUserInputFire();
     _bulletPull    = new BulletPull(bullet);
     _returnChecker = new TransformReturnChecker();
     _bullets       = new List <Transform>();
     _weaponLocker  = weaponLocker;
 }