// Use this for initialization void Start() { anim = GetComponent <Animator>(); // hacemos que el target sea el lugar donde se encuentra el jugador (GameObject con tag "Player") target = GameObject.FindGameObjectWithTag("Player").GetComponent <Transform>(); keyDrop = GetComponent <KeyDrop>(); timeLeftBtwShots = timeBtwShots; health = healthMax; notInMap = true; }
// Use this for initialization void Start() { cont = 0.2f; deathCont = 1f; isTouchingWall = false; rb = GetComponent <Rigidbody2D>(); anim = GetComponent <Animator>(); keyDrop = GetComponent <KeyDrop>(); EPICtimeLeftBtwShots = EPICtimeBtwShots; isAttacking = false; notInMap = true; dashCooldown = skeletonCooldown; //Movimiento target = GameObject.FindGameObjectWithTag("Player").GetComponent <Transform>(); }