added comments and organized project files

This commit is contained in:
djkellerman
2025-03-28 17:39:07 -04:00
parent 22f44a3f20
commit a098e8c053
84 changed files with 183 additions and 214 deletions

View File

@@ -0,0 +1,29 @@
using UnityEngine;
using UnityEngine.UI;
public class ModeSelect : MonoBehaviour
{
private ToggleGroup maps;
private void Start()
{
maps = GetComponent<ToggleGroup>();
}
void Update() // Updates the game mode based on the selected toggle
{
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;
}
else if (toggle.name == "Obstacle Course")
{
GameManager.gameMode = GameManager.GameMode.obstacleCourse;
}
}
}