Exemplo n.º 1
0
 void Start()
 {
     _joint     = gameObject.GetComponent <HingeJoint>();
     _rigidBody = gameObject.GetComponent <Rigidbody>();
     _muscle    = _joint.motor;
     currentRot = gameObject.transform.localRotation;
     use        = false;
     _released  = false;
     if (_parent != null)
     {
         _parentJoint = _parent.GetComponent <jointMotor>();
     }
 }
Exemplo n.º 2
0
    // Messages
    private void Awake()
    {
        _transform = GetComponent <Transform>();
        _rigidbody = GetComponent <Rigidbody>();
        _animator  = GetComponent <Animator>();

        _upperarmJoint = _upperarm.GetComponent <jointMotor>();
        _forearmJoint  = _forearm.GetComponent <jointMotor>();
        currentRot     = gameObject.transform.localRotation;
        _released      = false;
        _grabbing      = false;
        _switch        = false;
        _position      = false;
    }