CleanupCode add eating
This commit is contained in:
@@ -1,36 +1,36 @@
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
//using TMPro;
|
||||
//using UnityEngine;
|
||||
//using UnityEngine.UI;
|
||||
|
||||
public class ItemActionsUI : MonoBehaviour
|
||||
{
|
||||
[SerializeField]
|
||||
private TextMeshProUGUI _title;
|
||||
[SerializeField]
|
||||
private TextMeshProUGUI _description;
|
||||
//public class ItemActionsUI : MonoBehaviour
|
||||
//{
|
||||
// [SerializeField]
|
||||
// private TextMeshProUGUI _title;
|
||||
// [SerializeField]
|
||||
// private TextMeshProUGUI _description;
|
||||
|
||||
[SerializeField]
|
||||
private Button _btnCancel;
|
||||
// [SerializeField]
|
||||
// private Button _btnCancel;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
Hide();
|
||||
}
|
||||
// private void Start()
|
||||
// {
|
||||
// Hide();
|
||||
// }
|
||||
|
||||
public void Show(string title, string description)
|
||||
{
|
||||
gameObject.SetActive(true);
|
||||
_title.text = title;
|
||||
_description.text = description;
|
||||
// public void Show(string title, string description)
|
||||
// {
|
||||
// gameObject.SetActive(true);
|
||||
// _title.text = title;
|
||||
// _description.text = description;
|
||||
|
||||
_btnCancel.onClick.AddListener(() =>
|
||||
{
|
||||
Hide();
|
||||
});
|
||||
}
|
||||
// _btnCancel.onClick.AddListener(() =>
|
||||
// {
|
||||
// Hide();
|
||||
// });
|
||||
// }
|
||||
|
||||
private void Hide()
|
||||
{
|
||||
gameObject.SetActive(false);
|
||||
}
|
||||
}
|
||||
// private void Hide()
|
||||
// {
|
||||
// gameObject.SetActive(false);
|
||||
// }
|
||||
//}
|
||||
|
||||
Reference in New Issue
Block a user