void Start() { anim = GetComponent <Animator>(); nav = GetComponent <NavMeshAgent>(); tr = GetComponent <Transform>(); rb = GetComponent <Rigidbody>(); audio_attack = GetComponent <AudioSource>(); inv = invet.GetComponent <inventary>(); }
// Use this for initialization void Start() { inv = btn.GetComponent <inventary>(); }