Files
Crash-Course/Assets/Scripts/Game/MapSelect.cs
RochesterX 6b7dbea593 API
2025-04-16 19:57:54 -04:00

21 lines
422 B
C#

using UnityEngine; using Game; using Music; using Player;
using UnityEngine.UI;
namespace Game
{
public class MapSelect : MonoBehaviour
{
private ToggleGroup maps;
private void Start()
{
maps = GetComponent<ToggleGroup>();
}
void Update() // Sets the map based on the selected toggle
{
Toggle toggle = maps.GetFirstActiveToggle();
GameManager.map = toggle.name;
}
}
}