Пример #1
0
    IEnumerator Start()
    {
        groundForceAI = ragdoll.GetComponent <GroundForceAI>();
        fireGrapple   = true;
        if (transform.gameObject.GetComponent <SetupLoading>())
        {
            colliders = transform.gameObject.GetComponent <SetupLoading>().colliders;
        }
        else
        {
            colliders = transform.gameObject.GetComponent <AISetup>().colliders;
        }
        yield return(new WaitForEndOfFrame());

        if (refrenceKeeper)
        {
            activeSlot = refrenceKeeper.activeSlot;
        }
        hingeSpring = hinge.spring;
        yield return(new WaitForSeconds(0.3f));

        if (GameObject.Find("Items"))
        {
            localiseTransform = GameObject.Find("Items").GetComponent <LocaliseTransform>();
        }
    }
Пример #2
0
    IEnumerator Start()
    {
        yield return(new WaitForSeconds(0.3f));

        if (hasAuthority)
        {
            parent         = GetComponent <PlayerSetupAI>().parent;
            playerMovement = parent.transform.Find("Physics AnimatorAI").GetComponent <PlayerMovementAI>();
            groundForce    = parent.transform.Find("RagdollAI").GetComponent <GroundForceAI>();
            aimShoot       = parent.transform.Find("RagdollAI").GetComponent <AimShootAI>();
        }
    }