2025-04-16 19:57:54 -04:00
|
|
|
using UnityEngine; using Game; using Music; using Player;
|
2025-03-03 18:23:54 -05:00
|
|
|
using UnityEngine.UI;
|
2025-04-16 19:57:54 -04:00
|
|
|
namespace Game
|
|
|
|
|
{
|
2025-03-03 18:23:54 -05:00
|
|
|
|
|
|
|
|
public class ModeSelect : MonoBehaviour
|
|
|
|
|
{
|
|
|
|
|
private ToggleGroup maps;
|
|
|
|
|
|
|
|
|
|
private void Start()
|
|
|
|
|
{
|
|
|
|
|
maps = GetComponent<ToggleGroup>();
|
|
|
|
|
}
|
|
|
|
|
|
2025-03-28 17:39:07 -04:00
|
|
|
void Update() // Updates the game mode based on the selected toggle
|
2025-03-03 18:23:54 -05:00
|
|
|
{
|
|
|
|
|
Toggle toggle = maps.GetFirstActiveToggle();
|
|
|
|
|
if (toggle.name == "Free-For-All")
|
|
|
|
|
{
|
|
|
|
|
GameManager.gameMode = GameManager.GameMode.freeForAll;
|
|
|
|
|
}
|
|
|
|
|
else if (toggle.name == "Keep-Away")
|
|
|
|
|
{
|
|
|
|
|
GameManager.gameMode = GameManager.GameMode.keepAway;
|
|
|
|
|
}
|
2025-03-07 17:18:16 -05:00
|
|
|
else if (toggle.name == "Obstacle Course")
|
2025-03-03 18:23:54 -05:00
|
|
|
{
|
|
|
|
|
GameManager.gameMode = GameManager.GameMode.obstacleCourse;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-04-16 19:57:54 -04:00
|
|
|
}
|