Files
Darklings-FightingGame/Assets/_Project/Scripts/UIScripts/MenuScripts/ControlsMenu.cs
kidagine 2313a790eb update
2022-03-12 19:55:32 +01:00

24 lines
528 B
C#

using Demonics.UI;
using UnityEngine;
public class ControlsMenu : BaseMenu
{
[SerializeField] private GameObject[] _controlSchemes = default;
private int _currentControlSchemeIndex;
public void ToggleControlsScheme()
{
_currentControlSchemeIndex++;
if (_currentControlSchemeIndex >= _controlSchemes.Length)
{
_currentControlSchemeIndex = 0;
}
for (int i = 0; i < _controlSchemes.Length; i++)
{
_controlSchemes[i].SetActive(false);
}
_controlSchemes[_currentControlSchemeIndex].SetActive(true);
}
}