private void Start()
    {
        gunRecoiler = GetComponentInParent <Recoiler>();
        camRecoiler = FPSCamera.GetComponentInParent <Recoiler>();

        gunData.currentAmmo = gunData.magazineCapacity;

        if (audioSource == null)
        {
            audioSource = gameObject.AddComponent <AudioSource>();
        }

        bulletHitController = GetComponent <BulletHitController>();
    }
Beispiel #2
0
    private void Start()
    {
        // Recolier components references from gun and camera

        GUNRecoiler = GetComponentInParent <Recoiler>();
        CAMRecoiler = FPSCAMERA.GetComponentInParent <Recoiler>();



        gunData.currentAmmo = gunData.magazineCapacity;

        if (audioSource == null)
        {
            audioSource = gameObject.AddComponent <AudioSource>();
        }


        bulletHitController = GetComponent <BulletHitController>();
    }