public void Death() { gm.score += scoreWorth; gm.UpdateScore(); currentState = Enemy4State.Dead; fabCtrl.PlaySoundEnemy1Destroyed(); GetComponent <SpriteRenderer>().enabled = false; GetComponent <CircleCollider2D>().enabled = false; dp.DeathFX(); //gameObject.SetActive(false); }
public void Death() { gm.score += scoreWorth; gm.UpdateScore(); currentState = Enemy1State.Dead; fabCtrl.PlaySoundEnemy1Destroyed(); //GetComponent<SpriteRenderer>().enabled = false; GetComponent <BoxCollider2D>().enabled = false; foreach (MeshRenderer mesh in mr) { mesh.enabled = false; } dp.DeathFX(); }