public override void Initialize(SandarametAttackData data) { anim = data.animator; duration = data.transformationAnim.length; hit = data.sandaramet.GetComponentInChildren <BossHit>(); sidescroll = FindObjectOfType <Sidescroll>(); data.sandaramet.GetComponentInChildren <SandarametAttackManager>().stopCurrentAttack(); }
public void Attack() { //block player button buttonBlocker.SetActive(true); //spawn bullet GameObject hitter = Instantiate(bullet, transform.position, Quaternion.identity) as GameObject; BossHit bossHit = hitter.GetComponent <BossHit>(); bossHit.OnHitEvent.AddListener(DamagePlayer); bossHit.OnHitEvent.AddListener(ResetTurnCounter); }