22 lines
594 B
C#
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);
|
|
}
|
|
}
|
|
} |