Bugs 1
This commit is contained in:
15
Assets/Scripts/ObstacleCourse.cs
Normal file
15
Assets/Scripts/ObstacleCourse.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user