Пример #1
0
 private void Start()
 {
     animator          = GetComponent <Animator>();
     health            = GetComponent <Health>();
     body              = GetComponent <Rigidbody2D>();
     characterCollider = GetComponent <CapsuleCollider2D>();
     spriteRenderer    = GetComponentInChildren <SpriteRenderer>();
     attackMelee       = GetComponent <EnemyAttackMelee>();
     gameManager       = FindObjectOfType <GameManager>();
     player            = FindObjectOfType <PlayerMovement>();
     audioSource       = GetComponent <AudioSource>();
 }