// Use this for initialization
 void Start()
 {
     theCharacterMotor = GetComponentInParent<CharacterMotor2> ();
     theCharacterAutoCrouchTop = GetComponentInChildren<CharacterAutoCrouchTop> ();
     theCharacterAutoCrouchBottom = GetComponentInChildren<CharacterAutoCrouchBottom> ();
     theAnimator = GetComponentInParent<CharacterMotor2>().theAnimator;
     playerCollider = GetComponentInParent<BoxCollider>();
     originalColliderSize = playerCollider.size;
     originalColliderCenter = playerCollider.center;
 }
Пример #2
0
 // Use this for initialization
 void Start()
 {
     theCharacterMotor = GetComponentInParent<CharacterMotor> ();
     theCharacterAutoCrouchTop = GetComponentInChildren<CharacterAutoCrouchTop> ();
     theCharacterAutoCrouchBottom = GetComponentInChildren<CharacterAutoCrouchBottom> ();
 }