void Start() { vida = GetComponent <VidaEnemyBase>(); stMachine = GetComponent <StateMachine>(); col = GetComponent <Collider>(); agente = transform.GetComponent <UnityEngine.AI.NavMeshAgent>(); }
// Start is called before the first frame update void Start() { playerRef = FindObjectOfType <Mov>(); refStateManager = GetComponent <StateMachine>(); col = GetComponent <Collider>(); vidaEnemy = GetComponent <VidaEnemyBase>(); }
// Start is called before the first frame update void Start() { playerRef = FindObjectOfType <Mov>(); miAnim = GetComponent <Animator>(); refStateManager = GetComponent <StateMachine>(); vida = GetComponent <VidaEnemyBase>(); newScale(rangeObj, distance2Apuntar); }
void Start() { vida = GetComponent <VidaEnemyBase>(); agent = GetComponent <NavMeshAgent>(); speedMax = agent.speed; speedHitted = 0; anim = GetComponent <Animator>(); }
protected override void AplicarEfecto(Collider coll) { VidaEnemyBase enemyColisionado = coll.GetComponent <VidaEnemyBase>(); if (enemyColisionado != null) { enemyColisionado.TakeDamage(damageBala); } }
void Start() { miAnim = GetComponent <Animator>(); Animaciones(); vida = GetComponent <VidaEnemyBase>(); kamiNav = GetComponent <NavMeshAgent>(); player = GameObject.FindGameObjectWithTag("Player"); kamiBehaviour = GetComponent <Kamikaze>(); kamiNav.isStopped = false; }
// Start is called before the first frame update void Start() { playerRef = FindObjectOfType <DashCast>(); refStateManager = GetComponent <StateMachine>(); vidaEnemy = GetComponent <VidaEnemyBase>(); posInicial = transform.position; col = GetComponent <Collider>(); agente = transform.GetComponent <UnityEngine.AI.NavMeshAgent>(); miAnim = GetComponent <Animator>(); }
void Start() { start = transform.position; col = GetComponent <Collider>(); vida = GetComponent <VidaEnemyBase>(); Player = GameObject.FindGameObjectWithTag("Player"); kami = GetComponent <NavMeshAgent>(); Anim = GetComponent <Animator>(); cmpAudioSource = GetComponentInParent <AudioSource>(); refStateManager = GetComponent <StateMachine>(); }
void Start() { miAnim = GetComponent <Animator>(); vida = GetComponent <VidaEnemyBase>(); kamiNav = GetComponent <NavMeshAgent>(); start = transform.position; kamiNav.isStopped = false; kamiNav.SetDestination(vida.lookForPlayer); vida.hitted = false; refStateManager = GetComponent <StateMachine>(); Animaciones(); }
protected virtual void AplicarEfecto(Collider coll) // EN APLICAR EFECTO. BUSCA LA VIDA DEL PLAYER Y LE PASAS EL METODO TAKEDAMAGE(damageBala) ESTA VARIABLE LA TIENE { //EL SCRIPT VidaEnemyBase enemyColisionado = coll.GetComponent <VidaEnemyBase>(); if (enemyColisionado != null) { if (chocaEnemigo.Length != 0) { NuevoSonido(chocaEnemigo[Random.Range(0, chocaEnemigo.Length - 1)], this.transform.position, 5f); } // SoundVFX(chocaEnemigo); enemyColisionado.TakeDamage(damageBala); } /* EnemyVida enemyColisionado = collision.GetComponent<EnemyVida>(); Comprobar que sea enemigo y enviarle el daño que hace el tipo de bullet * if (enemyColisionado != null) * { * enemyColisionado.TakeDamage(damageBala); * } */ }