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); }
private void InitializeMachineGun(ShootConfig shootConfig) { _machineGun = new MachineGun(shootConfig); }