Files
Crash-Course/Assets/Scripts/ObstacleCourse.cs

19 lines
393 B
C#
Raw Normal View History

2025-04-16 19:57:54 -04:00
using UnityEngine; using Game; using Music; using Player;
namespace Game
{
2025-03-31 18:28:05 -04:00
public class ObstacleCourse : MonoBehaviour
{
public static GameObject playerWon;
void OnTriggerEnter2D(Collider2D collision)
{
if (collision.gameObject.CompareTag("Player"))
{
playerWon = collision.gameObject;
GameManager.Instance.GameOver();
}
}
}
2025-04-16 19:57:54 -04:00
}