16 lines
335 B
C#
16 lines
335 B
C#
using UnityEngine;
|
|
|
|
public class ObstacleCourse : MonoBehaviour
|
|
{
|
|
public static GameObject playerWon;
|
|
|
|
void OnTriggerEnter2D(Collider2D collision)
|
|
{
|
|
if (collision.gameObject.CompareTag("Player"))
|
|
{
|
|
playerWon = collision.gameObject;
|
|
GameManager.Instance.GameOver();
|
|
}
|
|
}
|
|
}
|