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:
27
Assets/Scripts/Game/ObstacleEnd.cs
Normal file
27
Assets/Scripts/Game/ObstacleEnd.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using Game;
|
||||
using UnityEngine;
|
||||
|
||||
public class ObstacleEnd : MonoBehaviour
|
||||
{
|
||||
void Start()
|
||||
{
|
||||
UpdateVisibility();
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
UpdateVisibility();
|
||||
}
|
||||
|
||||
private void UpdateVisibility() // Sets object active if playing obstacle course
|
||||
{
|
||||
if (GameManager.gameMode == GameManager.GameMode.obstacleCourse)
|
||||
{
|
||||
gameObject.SetActive(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
gameObject.SetActive(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/Game/ObstacleEnd.cs.meta
Normal file
2
Assets/Scripts/Game/ObstacleEnd.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 69fc903d39ac3d24aab4ce7a68dba447
|
||||
Reference in New Issue
Block a user