void Place_MAG_bunObj(MagsBundle _argMagsbun) { Transform _maggrip = Factory_OFF_Hand.GetComponent <BaseHandScript>().MyBundleBone; _argMagsbun.transform.position = _maggrip.position; _argMagsbun.transform.rotation = _maggrip.rotation; _argMagsbun.transform.parent = _maggrip; }
void FindBundles() { MNGR_GunsBundle = GetComponentInChildren <GunsBundle>(); MNGR_MagsBundle = GetComponentInChildren <MagsBundle>(); if (MNGR_MagsBundle == null) { Debug.Log("no mags bundur found"); } if (MNGR_GunsBundle == null) { Debug.Log("no guns bundur found"); } }
public GameObject FactoryBuild_OffHand(bool argIsRightySetup, Transform StemObjTransform, MagsBundle argMagsbun) { Factory_OFF_Hand = Instantiate(OffHandObj, StemObjTransform.position, StemObjTransform.rotation) as GameObject; if (argIsRightySetup) { Factory_OFF_Hand.transform.localScale = new Vector3(-1, 1, 1); Factory_OFF_Hand.transform.localEulerAngles = new Vector3(StemObjTransform.rotation.x, 0, -90); } else { Factory_OFF_Hand.transform.localScale = new Vector3(1, 1, 1); Factory_OFF_Hand.transform.localEulerAngles = new Vector3(StemObjTransform.rotation.x, 0, 90); } Factory_OFF_Hand.name = "PlayerLoadyHand"; Factory_OFF_Hand.transform.parent = StemObjTransform.transform; Place_MAG_bunObj(argMagsbun); Factory_OFF_Hand.GetComponent <BaseHandScript>().InitializedThisHand(argMagsbun); return(Factory_OFF_Hand); }