using Platformer.Gameplay;
using UnityEngine;
using static Platformer.Core.Simulation;
namespace Platformer.Mechanics
{
///
/// Marks a trigger as a VictoryZone, usually used to end the current game level.
///
public class VictoryZone : MonoBehaviour
{
void OnTriggerEnter2D(Collider2D collider)
{
var p = collider.gameObject.GetComponent();
if (p != null)
{
var ev = Schedule();
ev.victoryZone = this;
}
}
}
}