private void Awake() { dispara = GetComponent <DisparoEnemigo>(); moverse = GetComponent <EnemigoToPlayer>(); oscila = GetComponentInParent <Oscilate>(); tripas = GetComponent <Tripas>(); gira = GetComponent <Flip>(); stinky = GetComponent <Stinky>(); anim = transform.GetComponentInParent <Animator>(); dragon = GetComponentInChildren <Dragon>(); piston = GetComponentInParent <Pistonn>(); }
private void Start() { //componentes player disparoPlayer = GetComponent <Disparar>(); movimientoPlayer = GetComponentInChildren <PlayerMovement>(); knockback = GetComponentInChildren <Knockback>(); rb = GetComponent <Rigidbody2D>(); vidasExtra = 0; //componentes de enemigos dispara = GetComponentInChildren <DisparoEnemigo>(); moverse = GetComponentInChildren <EnemigoToPlayer>(); //animacion if (gameObject.GetComponentInChildren <FlipMimico>() != null) { anim = transform.GetComponentInChildren <Animator>(); } else { anim = transform.GetComponent <Animator>(); } }