12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.UI;
- public class NoMapUI : MonoBehaviour
- {
- public Button safetyAreaButton;
- public Text outOfSafetyAreaText;
- public Text createSafetyAreaText;
- // Start is called before the first frame update
- private void Start()
- {
- safetyAreaButton.onClick.AddListener(OnSafetyAreaButtonClick);
- }
- private void OnDestroy()
- {
- safetyAreaButton.onClick.RemoveListener(OnSafetyAreaButtonClick);
- }
- private void OnEnable()
- {
- SafetyAreaLanguageManager.Instance.onLanguageChange += ChangeLanguageText;
- ChangeLanguageText();
- }
- private void OnDisable()
- {
- SafetyAreaLanguageManager.Instance.onLanguageChange -= ChangeLanguageText;
- }
- public void ChangeLanguageText()
- {
- outOfSafetyAreaText.text = SafetyAreaLanguageManager.Instance.GetWord(106037);
- createSafetyAreaText.text = SafetyAreaLanguageManager.Instance.GetWord(106038);
- }
- private void OnSafetyAreaButtonClick()
- {
- SafetyAreaManager.Instance.StartSetSafetyArea();
- }
- }
|