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