void Start() { chaser = GetComponent<ChasesPlayer>(); hurt = GetComponent<Hurtable>(); faces = GetComponent<FacesPlayer>(); drops = GetComponent<DropsItems>(); attacks = GetComponent<AttacksPlayer>(); anim = GetComponent<Animator>(); hurt.onDeath += hurt_onDeath; hurt.onHurt += hurt_onHurt; }
void Start() { anim = GetComponent<Animator>(); dropper = GetComponent<DropsItems>(); chaser = GetComponent<ChasesPlayer>(); faces = GetComponent<FacesPlayer>(); hurt = GetComponent<Hurtable>(); hurt.onDeath += hurt_onDeath; hurt.onHurt += hurt_onHurt; audioSrc = GetComponent<AudioSource>(); attacks = GetComponent<AttacksPlayer>(); attacks.onPlayerDeath += attacks_onPlayerDeath; }
void Start() { anim = GetComponent<Animator>(); dropper = GetComponent<DropsItems>(); chaser = GetComponent<ChasesPlayer>(); faces = GetComponent<FacesPlayer>(); audSrc = GetComponent<AudioSource>(); attacks = GetComponent<AttacksPlayer>(); attacks.onPlayerHit += attacks_onPlayerHit; hurt = GetComponent<Hurtable>(); hurt.onDeath += hurt_onDeath; hurt.onHurt += hurt_onHurt; tag = "enemy"; //For items to detect and deliver damage }