proto_racer/Assets/Scripts/CheckPoint.cs

13 lines
201 B
C#

using System;
using UnityEngine;
public class CheckPoint : MonoBehaviour
{
public Action CarPassed;
private void OnTriggerEnter2D(Collider2D other)
{
CarPassed?.Invoke();
}
}