added comments and organized project files
This commit is contained in:
18
Assets/Scripts/Game/MapSelect.cs
Normal file
18
Assets/Scripts/Game/MapSelect.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user