Example #1
0
 void Awake()
 {
     gunParticles = GetComponent <ParticleSystem>();
     gunLine      = GetComponent <LineRenderer>();
     gunAnim      = transform.parent.GetComponent <GunAnimation>();
     gunSound     = GetComponent <GunSound>();
 }
Example #2
0
 public override void Start()
 {
     bulletsRemaining = MagazineCapacity;
     gunSfxInstance   = GunSound?.CreateInstance();
     if (gunSfxInstance != null)
     {
         // boost sfx volume
         gunSfxInstance.Volume = 10;
         gunSfxInstance.Stop();
     }
 }