private void Awake() { timer = 0f; //Characteristics of wolf timeBetweenAttacks = 0.833f; // time between attack Playerdamage = stats.CurrentPlayerDamage; enclosureDamage = stats.CurrentEnclosureDamage; anim_time = 0.5f; rotationSpeed = 4f; //Initial set up targetTransform = null; moving = false; isAttacking = false; targetTag = "Aucune"; alreadyFocusingAFence = false; firstSPhere = GetComponent <SphereCollider>(); focusingPlayer = false; focusingLeurre = false; player = GameObject.FindGameObjectWithTag("Player"); enclosFound = false; script_audio = GetComponent <AudioManagerWolves>(); }
// Use this for initialization void Start() { anim = GetComponent <Animator>(); agent = GetComponent <NavMeshAgent>(); agent.Warp(this.gameObject.transform.position); NavMesh.pathfindingIterationsPerFrame = 500; enclos = GameObject.FindGameObjectsWithTag("Enclos"); GetTargetEnclos(); script_audio = GetComponent <AudioManagerWolves>(); }
private void Awake() { health = (int)wolfStats.CurrentLife; health_max = health; anim = GetComponent <Animator>(); cloud = GetComponentInChildren <ParticleSystem>(); script_ui = GetComponent <UI_Health_Boss>(); script_audio = GetComponent <AudioManagerWolves>(); alive = true; }
// Use this for initialization void Start() { script_audio = GetComponent <AudioManagerWolves>(); waterJet = jets.GetComponentInChildren <ParticleSystem>(); anim = GetComponent <Animator>(); agent = GetComponent <UnityEngine.AI.NavMeshAgent>(); agent.Warp(this.gameObject.transform.position); UnityEngine.AI.NavMesh.pathfindingIterationsPerFrame = 500; enclos = GameObject.FindGameObjectsWithTag("Enclos"); GetTargetEnclos(); }
private void Awake() { timer = 0f; //Characteristics of the wolf timeBetweenAttacks = 0.833f; // time between attack playerDamage = stats.CurrentPlayerDamage; enclosureDamage = stats.CurrentEnclosureDamage; anim_time = 0.5f; rotationSpeed = 2f; //Initial set up targetTransform = null; moving = false; isAttacking = false;; focusingLeurre = false; focusingPlayer = false; player = GameObject.FindGameObjectWithTag("Player"); collider = GetComponent <BoxCollider>(); enclosFound = true; script_audio = GetComponent <AudioManagerWolves>(); }