void SetInitialReferences() { gunMaster = GetComponent <Gun_Master>(); gunAim = GetComponentInChildren <Gun_Aim>(); myTransform = new Vector3(0f, 0f, 0f); gunAnimator = GetComponent <Animator>(); playerTransform = GameManager_References._player.transform; FindWeaponCamera(playerTransform); SetCameraOnDynamicCrosshairCanvas(); SetPlaneDistanceOnDynamicCrosshairCanvas(); }
void SetInitialReferences() { gunMaster = GetComponentInParent <Gun_Master>(); gunAnimation = GetComponentInParent <Gun_Animation>(); gunSounds = GetComponentInParent <Gun_Sounds>(); gunAim = GetComponent <Gun_Aim>(); if (GameManager_References._player != null) { playerMaster = GameManager_References._player.GetComponent <Player_Master>(); playerAmmoBox = GameManager_References._player.GetComponent <Player_AmmoBox>(); } }