Esempio n. 1
0
    void Place_GUN_bunObj(GunsBundle _argGunsBun)
    {
        Transform _gungrip = Factory_MAIN_Hand.GetComponent <BaseHandScript>().MyBundleBone;

        _argGunsBun.transform.position = _gungrip.position;
        _argGunsBun.transform.rotation = _gungrip.rotation;
        _argGunsBun.transform.parent   = _gungrip;
    }
    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");
        }
    }
Esempio n. 3
0
    public GameObject FactoryBuild_MainHand(bool argIsRightySetup, Transform StemObjTransform, GunsBundle argGunsBun)
    {
        Factory_MAIN_Hand = Instantiate(MainHandObj, StemObjTransform.position, StemObjTransform.rotation) as GameObject;

        if (argIsRightySetup)
        {
            Factory_MAIN_Hand.transform.localScale = new Vector3(1, 1, 1);
        }

        else
        {
            Factory_MAIN_Hand.transform.localScale = new Vector3(-1, 1, 1);
            Factory_MAIN_Hand.transform.position   = new Vector3(StemObjTransform.parent.position.x, StemObjTransform.position.y, StemObjTransform.position.z);
        }

        Factory_MAIN_Hand.name             = "PlayerShootyHand";
        Factory_MAIN_Hand.transform.parent = StemObjTransform.transform;
        Place_GUN_bunObj(argGunsBun);
        Factory_MAIN_Hand.GetComponent <BaseHandScript>().InitializedThisHand(argGunsBun);
        return(Factory_MAIN_Hand);
    }