public void AssignHand(GameObject hand) { if (hasAuthority && this.hand != hand) { this.hand = hand; armTarget = hand.GetComponent <NetworkArmMovement>().GetArmTarget(); arm = hand.GetComponent <NetworkArmMovement>(); AttachHand(this.hand); hand.GetComponent <NetworkArmMovement>().SetNetworkHand(this); } }
public void AttachHand(GameObject hand) { if (hand != null) { this.armTarget = hand.GetComponent <NetworkArmMovement>().GetArmTarget(); this.arm = hand.GetComponent <NetworkArmMovement>(); if (hasAuthority) { CmdUpdateHandAttachment(hand); } } else { Debug.Log("Oopsies"); } }
public void CmdUpdateHandAttachment(GameObject hand) { this.armTarget = hand.GetComponent <NetworkArmMovement>().GetArmTarget(); this.arm = hand.GetComponent <NetworkArmMovement>(); hand.GetComponent <HandScript>().AttachToPlayer(this.gameObject); }