Beispiel #1
0
 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);
     }
 }
Beispiel #2
0
 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");
     }
 }
Beispiel #3
0
 public void CmdUpdateHandAttachment(GameObject hand)
 {
     this.armTarget = hand.GetComponent <NetworkArmMovement>().GetArmTarget();
     this.arm       = hand.GetComponent <NetworkArmMovement>();
     hand.GetComponent <HandScript>().AttachToPlayer(this.gameObject);
 }