Files
2D-Plattformer-Example/Assets/Scripts/Gameplay/PlayerEnteredDeathZone.cs
T
2026-04-30 00:53:30 +02:00

22 lines
594 B
C#

using Platformer.Core;
using Platformer.Mechanics;
using Platformer.Model;
namespace Platformer.Gameplay
{
/// <summary>
/// Fired when a player enters a trigger with a DeathZone component.
/// </summary>
/// <typeparam name="PlayerEnteredDeathZone"></typeparam>
public class PlayerEnteredDeathZone : Simulation.Event<PlayerEnteredDeathZone>
{
public DeathZone deathzone;
PlatformerModel model = Simulation.GetModel<PlatformerModel>();
public override void Execute()
{
Simulation.Schedule<PlayerDeath>(0);
}
}
}