using UnityEngine; using Game; using Music; using Player; using UnityEngine.UI; namespace Game { /// /// This class manages the map selection process by setting the selected map /// based on the active toggle in the toggle group. /// public class MapSelect : MonoBehaviour { /// /// The toggle group containing the map selection toggles. /// private ToggleGroup maps; /// /// Initializes the toggle group for map selection. /// private void Start() { maps = GetComponent(); } /// /// Updates the selected map in the game manager based on the active toggle. /// private void Update() { // Get the currently active toggle and set the selected map Toggle toggle = maps.GetFirstActiveToggle(); GameManager.map = toggle.name; } } }