Example #1
0
 public ShootHandler(
     Transform transform,
     Settings settings,
     Bullet.Factory bulletFactory)
 {
     this.bulletFactory = bulletFactory;
     this.settings      = settings;
     this.transform     = transform;
     throttledShoot     = ThrottledFunction.ThrottleByRate(DoShoot, this.settings.fireRate);
 }
Example #2
0
 public ShootHandler(
     Transform transform,
     Rigidbody2D rigidbody,
     Bullet.Factory bulletFactory,
     Settings settings)
 {
     this.transform     = transform;
     this.rigidbody     = rigidbody;
     this.bulletFactory = bulletFactory;
     this.settings      = settings;
     throttledShoot     = ThrottledFunction.ThrottleByRate(DoShoot, settings.fireRate);
 }