Example #1
0
 public MachineGun(ShootConfig shootConfig)
 {
     _muzzleTransform = shootConfig.MuzzleTransform;
     foreach (Projectile p in shootConfig.ProjectileList)
     {
         _projectileQueue.Enqueue(p);
     }
     ChangeProjectile();
     _minImpulse = shootConfig.MinImpulse;
     _maxImpulse = shootConfig.MaxImpulse;
     shootConfig.ShootButton.onClick.AddListener(Shoot);
     shootConfig.ChangeProjectileButton.onClick.AddListener(ChangeProjectile);
 }
Example #2
0
 private void InitializeMachineGun(ShootConfig shootConfig)
 {
     _machineGun = new MachineGun(shootConfig);
 }