Esempio n. 1
0
        // Called when grappling previous frame, but not this one
        void onReleaseGrapple()
        {
            // Reset gravity back to normal
            changeGravity(true);

            if (grappleTargetRigid && isDynamic)
            {
                grappleTargetRigid.useGravity       = true;
                grappleTargetRigid.isKinematic      = false;
                grappleTargetRigid.transform.parent = grappleTargetParent;

                // More reliable method of resetting parent :
                if (grappleTargetRigid.GetComponent <Grabbable>())
                {
                    grappleTargetRigid.GetComponent <Grabbable>().ResetParent();
                }
            }

            // Reset Climbing
            ClimbHelper.transform.localPosition = Vector3.zero;
            playerClimbing.RemoveClimber(thisGrabber);
            climbing = false;

            grappling        = false;
            validTargetFound = false;
            isDynamic        = false;
            wasGrappling     = false;
        }
Esempio n. 2
0
        public override void DropItem(Grabber droppedBy)
        {
            if (droppedBy != null && playerClimbing != null)
            {
                playerClimbing.RemoveClimber(droppedBy);
            }

            base.DropItem(droppedBy);
        }