UI components completed

added button functionality and mesh grid to scene
This commit is contained in:
dereelatwit
2023-08-08 15:30:55 -04:00
parent 3ac2b11494
commit aec4fc6d37
15 changed files with 3511 additions and 254 deletions
@@ -0,0 +1,36 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;
public class AgentButton : MonoBehaviour, IPointerDownHandler, IPointerUpHandler
{
[SerializeField] private Image _img;
[SerializeField] private Sprite _default, _pressed;
public void OnPointerDown(PointerEventData eventData)
{
_img.sprite = _pressed;
}
public void OnPointerUp(PointerEventData eventData)
{
_img.sprite = _default;
}
public void IWasClicked()
{
Debug.Log("Placing Mode: Agent");
}
}