using Platformer.Core;
using Platformer.Mechanics;
namespace Platformer.Gameplay
{
///
/// Fired when the health component on an enemy has a hitpoint value of 0.
///
///
public class EnemyDeath : Simulation.Event
{
public EnemyController enemy;
public override void Execute()
{
enemy._collider.enabled = false;
enemy.control.enabled = false;
if (enemy._audio && enemy.ouch)
enemy._audio.PlayOneShot(enemy.ouch);
}
}
}