/*Checks if the button is pressed, which indicates that the hand is closed and adjusts the state of the hand*/ void Update() { if (wiiInUse) { if (isLeftHand) { this.handClosed = wii.holdButtonA(); } else { this.handClosed = wii.holdButtonB(); } } }
/*Checks if the button is pressed, which indicates that the hand is closed and adjusts the state of the hand*/ void Update() { if (wiiInUse) { if (isLeftHand) { this.oldHandClosed = this.handClosed; this.handClosed = wii.holdButtonA(); if (!this.oldHandClosed && this.handClosed) { leftHandAnimator.Play("Hand_Left_grab"); } if (this.oldHandClosed && !this.handClosed) { leftHandAnimator.Play("Hand_Left_normal_state"); } } else { this.oldHandClosed = this.handClosed; this.handClosed = wii.holdButtonB(); if (!this.oldHandClosed && this.handClosed) { rightHandAnimator.Play("Hand_Right_grab"); } if (this.oldHandClosed && !this.handClosed) { rightHandAnimator.Play("Hand_Right_normal_state"); } } } }