initial commit

This commit is contained in:
2026-05-16 16:12:06 +08:00
parent a7e4ebd4f8
commit f432cfa92f
1008 changed files with 409466 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
using Platformer.Core;
using Platformer.Mechanics;
namespace Platformer.Gameplay
{
/// <summary>
/// Fired when the health component on an enemy has a hitpoint value of 0.
/// </summary>
/// <typeparam name="EnemyDeath"></typeparam>
public class EnemyDeath : Simulation.Event<EnemyDeath>
{
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);
}
}
}