void Start() { grabClipArea = GetComponentInChildren <GrabberArea>(); if (transform.parent != null) { parentWeapon = transform.parent.GetComponent <RaycastWeapon>(); } }
void Start() { if (GameObject.FindGameObjectWithTag("Player")) { input = GameObject.FindGameObjectWithTag("Player").GetComponent <InputBridge>(); } grabClipArea = GetComponentInChildren <GrabberArea>(); if (transform.parent != null) { parentWeapon = transform.parent.GetComponent <RaycastWeapon>(); } }
void Start() { initialLocalPos = transform.localPosition; audioSource = GetComponent <AudioSource>(); parentWeapon = transform.parent.GetComponent <RaycastWeapon>(); parentGrabbable = transform.parent.GetComponent <Grabbable>(); thisGrabbable = GetComponent <Grabbable>(); rigid = GetComponent <Rigidbody>(); initialMass = rigid.mass; if (parentWeapon != null) { Physics.IgnoreCollision(GetComponent <Collider>(), parentWeapon.GetComponent <Collider>()); } }
void Awake() { grabClipArea = GetComponentInChildren <GrabberArea>(); if (transform.parent != null) { parentWeapon = transform.parent.GetComponent <RaycastWeapon>(); } // Check to see if we started with a loaded magazine if (HeldMagazine != null) { AttachGrabbableMagazine(HeldMagazine, HeldMagazine.GetComponent <Collider>()); } }