RiftMayhem/Assets/Scripts/UI/GameOptionsController.cs
Pedro Gomes bc4019ffdf Necromancer updates & bugfix
- Added Necromancer ultimate ability (Summon Golem)
- Updated and bugfixed golem minion
- Added New slam ability for golem
- Bugfixed damage over time effect calculate final damage when owner no longer exists
- Fixed an issue causing items to be vendored even with vendor closed
2024-07-23 21:26:32 +01:00

39 lines
879 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class GameOptionsController : MonoBehaviour
{
[SerializeField]
public List<GameObject> otherUIs;
[SerializeField] private GameObject GameOptionsUI;
[SerializeField] private GameEvent OnGameOptionsOpenned;
private void Start()
{
GameOptionsUI.SetActive(false);
QualitySettings.vSyncCount = 1;
}
// Update is called once per frame
void Update()
{
if (Input.GetKeyDown(KeyCode.Escape)) ToggleGameOptionsUI();
}
private void ToggleGameOptionsUI()
{
GameOptionsUI.SetActive(!GameOptionsUI.activeSelf);
if (!GameOptionsUI.activeSelf) return;
for (int i = 0; i < otherUIs.Count; i++)
{
otherUIs[i].SetActive(false);
}
OnGameOptionsOpenned.Raise();
}
}