using System.Collections;
using System.Collections.Generic;
using Platformer.Gameplay;
using UnityEngine;
using static Platformer.Core.Simulation;
namespace Platformer.Mechanics
{
///
/// DeathZone components mark a collider which will schedule a
/// PlayerEnteredDeathZone event when the player enters the trigger.
///
public class DeathZone : MonoBehaviour
{
void OnTriggerEnter2D(Collider2D collider)
{
var p = collider.gameObject.GetComponent();
if (p != null)
{
var ev = Schedule();
ev.deathzone = this;
}
}
}
}