private void Start() { gunSound = GetComponent <AudioSource>(); recoil = GetComponent <New_Weapon_Recoil_Script>(); fpsCam = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <Camera>(); impactEffect = GameObject.FindGameObjectWithTag("DefaultHit"); gunSound = GetComponent <AudioSource>(); currentAmmo = maxAmmo; }
private void Start() { lastShootTime = Time.time; recoilScript = GetComponentInParent <New_Weapon_Recoil_Script>(); }
void Start() { gun = GameObject.FindWithTag("Gun"); Recoil = gun.GetComponent <New_Weapon_Recoil_Script>(); sway = gameObject.GetComponent <GunSway>(); }