// Use this for initialization void Start() { function += GetComponent <IA_Wolves_Attack>().updateTarget; anim = GetComponent <Animator>(); agent = GetComponent <NavMeshAgent>(); //updateTarget(fakenclos.transform); agent.Warp(this.gameObject.transform.position); NavMesh.pathfindingIterationsPerFrame = 500; // GetTargetEnclos(); }
// Use this for initialization void Start() { function += GetComponent <IA_Wolves_Water_Attack>().updateTarget; anim = GetComponent <Animator>(); agent = GetComponent <NavMeshAgent>(); //updateTarget(fakenclos.transform); agent.Warp(this.gameObject.transform.position); GetTargetEnclos(); }
// Use this for initialization void Start() { function += GetComponent <IA_Wolves_Boss_Attack>().updateTarget; anim = GetComponent <Animator>(); agent = GetComponent <NavMeshAgent>(); updateTarget(farmer.transform); agent.Warp(this.gameObject.transform.position); farmer.GetComponent <Player>().AddSubscriberRespawn(targetPlayer); //GetTargetEnclos(); }
private void OnTriggerEnter(Collider other) { TriggerTag _collidingTag = other.GetComponent <TriggerTag>(); if (_collidingTag != null) { if (_collidingTag._tag == _activationTag) { _activationEvent.Invoke(); } } }