Few bug fixes
Fixed `Time Left!` display. Added obstacle course ends for all 4 maps. Sets obstacle course end goals to only work on the correct gamemode. Set correct time limits for keep away in every map.
This commit is contained in:
19
Assets/Scripts/Game/ObstacleCourse.cs
Normal file
19
Assets/Scripts/Game/ObstacleCourse.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using UnityEngine; using Game; using Music; using Player;
|
||||
|
||||
namespace Game
|
||||
{
|
||||
|
||||
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