| | 1 | | using System; |
| | 2 | | using TMPro; |
| | 3 | | using UnityEngine; |
| | 4 | | using UnityEngine.EventSystems; |
| | 5 | |
|
| | 6 | | public class UsersAroundListHUDButtonView : MonoBehaviour, IUsersAroundListHUDButtonView, IPointerDownHandler |
| | 7 | | { |
| | 8 | | [SerializeField] private TextMeshProUGUI usersCountText; |
| | 9 | |
|
| 0 | 10 | | public void SetUsersCount(int count) { usersCountText.text = count.ToString(); } |
| | 11 | |
|
| | 12 | | public event Action OnClick; |
| | 13 | | public void ToggleUsersCount(bool isEnabled) |
| | 14 | | { |
| 1 | 15 | | usersCountText.gameObject.SetActive(isEnabled); |
| 1 | 16 | | } |
| | 17 | |
|
| 0 | 18 | | void IPointerDownHandler.OnPointerDown(PointerEventData eventData) { OnClick?.Invoke(); } |
| | 19 | | } |