Пример #1
0
        // Token: 0x06003B3F RID: 15167 RVA: 0x0012A440 File Offset: 0x00128840
        public void GrabBegin(Hand hand, GrabPoint grabPoint)
        {
            this.m_grabbedHand      = hand;
            this.m_grabbedGrabPoint = grabPoint;
            if (this.m_grabbedGrabPoint.Rigidbody != null)
            {
                this.m_grabbedKinematic = this.m_grabbedGrabPoint.Rigidbody.isKinematic;
                this.m_grabbedGrabPoint.Rigidbody.isKinematic = true;
            }
            GrabbableGrabMsg grabbableGrabMsg = new GrabbableGrabMsg
            {
                Sender = this
            };

            this.SendMsg("OnGrabBegin", grabbableGrabMsg);
        }
Пример #2
0
        // Token: 0x06003B40 RID: 15168 RVA: 0x0012A4BC File Offset: 0x001288BC
        public void GrabEnd(Vector3 linearVelocity, Vector3 angularVelocity)
        {
            if (this.m_grabbedGrabPoint.Rigidbody != null)
            {
                this.m_grabbedGrabPoint.Rigidbody.isKinematic     = this.m_grabbedKinematic;
                this.m_grabbedGrabPoint.Rigidbody.velocity        = linearVelocity;
                this.m_grabbedGrabPoint.Rigidbody.angularVelocity = angularVelocity;
            }
            GrabbableGrabMsg grabbableGrabMsg = new GrabbableGrabMsg
            {
                Sender = this
            };

            this.SendMsg("OnGrabEnd", grabbableGrabMsg);
            this.m_grabbedHand      = null;
            this.m_grabbedGrabPoint = null;
        }