private void Death() { healthBar.DisableHealthBar(); rb.velocity = new Vector2(0, 0); moveSideways = false; CancelInvoke(); StartCoroutine("waitToDeath"); }
private void Death() { healthBar.DisableHealthBar(); anim.Play("ToDeath"); sounds.PlayDeathSound(); GameManager.Instance.EnemyDied(); bodyColGO.SetActive(false); this.GetComponent <CapsuleCollider2D>().enabled = (false); }