public override void Enter(Enemy e) { e.animator.SetTrigger("Dead"); OnEnemyDead.Invoke(this, System.EventArgs.Empty); MagicBall.OnMagicHit -= e.OnHitByMagicBall; }
public void OnEnemyDead_FireEvent() { OnEnemyDead?.Invoke(this, EventArgs.Empty); }
void HandleEnemyDead(OnEnemyDead e) => EndGame(true);
private void OnEnable() { _health.OnDead += DeadAction; _health.OnDead += () => OnEnemyDead?.Invoke(deadClip); }