private void ChangeControl()
 {
     if (Input.GetKeyDown(KeyCode.Tab) && state != State.charge)
     {
         if ((arms == 1 && enabledArms == 2) ||
             (arms == 0 && enabledArms == 1))
         {
             if (isControlling)
             {
                 if (!isLeftRetrieving)
                 {
                     isControlling = false;
                     firstArm.SetControl(true);
                 }
             }
             else if (firstArm.GetControl())
             {
                 isControlling = true;
                 firstArm.SetControl(false);
             }
         }
         else if (arms == 0)
         {
             if (isControlling)
             {
                 if (!isLeftRetrieving)
                 {
                     isControlling = false;
                     firstArm.SetControl(true);
                 }
             }
             else if (firstArm.GetControl())
             {
                 firstArm.SetControl(false);
                 secondArm.SetControl(true);
             }
             else
             {
                 isControlling = true;
                 secondArm.SetControl(false);
             }
         }
     }
 }
    protected void DisableControl()
    {
        bool playerControl   = player.HasControl();
        bool leftArmControl  = leftArm.GetControl();
        bool rightArmControl = rightArm.GetControl();

        if (playerControl)
        {
            controlIndex = 0;
            player.ResetPower();
        }
        else if (leftArmControl)
        {
            controlIndex = 1;
        }
        else if (rightArmControl)
        {
            controlIndex = 2;
        }

        player.SetControl(false);
        leftArm.SetControl(false);
        rightArm.SetControl(false);
    }