2022-12-07 12:13:57 +02:00
|
|
|
using System.Collections;
|
|
|
|
|
using TMPro;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
using UnityEngine.UI;
|
|
|
|
|
|
|
|
|
|
public class VersusMenu : BaseMenu
|
|
|
|
|
{
|
|
|
|
|
[SerializeField] private Selectable _localOption = default;
|
|
|
|
|
[SerializeField] private GameObject _unavailableText = default;
|
|
|
|
|
[SerializeField] private Image _startingImage = default;
|
|
|
|
|
[SerializeField] private TextMeshProUGUI _startingText = default;
|
2023-04-30 14:36:29 +03:00
|
|
|
[SerializeField] private TextMeshProUGUI _experimentalText = default;
|
2022-12-07 12:13:57 +02:00
|
|
|
|
|
|
|
|
void OnEnable()
|
|
|
|
|
{
|
|
|
|
|
#if UNITY_WEBGL
|
|
|
|
|
StartCoroutine(ActivateCoroutine());
|
2023-01-16 13:26:54 +02:00
|
|
|
#endif
|
|
|
|
|
#if !UNITY_WEBGL
|
2023-04-30 14:36:29 +03:00
|
|
|
_experimentalText.gameObject.SetActive(true);
|
2022-12-07 12:13:57 +02:00
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
IEnumerator ActivateCoroutine()
|
|
|
|
|
{
|
|
|
|
|
yield return null;
|
|
|
|
|
_startingOption.GetComponent<Button>().interactable = false;
|
|
|
|
|
_startingOption.GetComponent<Animator>().enabled = false;
|
|
|
|
|
_startingText.color = Color.gray;
|
|
|
|
|
_startingImage.color = Color.gray;
|
|
|
|
|
_unavailableText.SetActive(true);
|
|
|
|
|
yield return null;
|
|
|
|
|
_localOption.Select();
|
|
|
|
|
}
|
|
|
|
|
}
|