void Awake() { nav = GetComponent <NavMeshAgent> (); anim = GetComponent <Animator> (); hash = GameObject.Find("gameController").GetComponent <HashIDs> (); fiende = this.GetComponent <Fiende> (); angrep = GetComponent <LitenVikingAngrep> (); originalSpeed = nav.speed; //Kjører konstruktøren fra LitenViking AnimatorSetup animSetup = new LitenVikingAnimatorSetup(anim, hash); }
// Use this for initialization //Finner skripet i hirarkiet void Awake() { litenVikingAngrep = gameObject.GetComponentInParent <LitenVikingAngrep> (); }