예제 #1
0
    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;
    }
예제 #2
0
 private void Start()
 {
     lastShootTime = Time.time;
     recoilScript  = GetComponentInParent <New_Weapon_Recoil_Script>();
 }
예제 #3
0
 void Start()
 {
     gun    = GameObject.FindWithTag("Gun");
     Recoil = gun.GetComponent <New_Weapon_Recoil_Script>();
     sway   = gameObject.GetComponent <GunSway>();
 }