public void OnPointerEnter(PointerEventData eventData) { byte _unitID = Game.Instance.GetUnitIDInArmy(_slotID, out bool error); if (error == false) { _infoWindow.SetActive(true); _infoText.text = UnitsData.GetUnit(_unitID).ToString(); } }
private void UpdateUI(int slotID, byte unitID) { _troopSprite[slotID].sprite = Resources.Load <Sprite>(UnitsData.GetUnit(unitID).Sprite); _troopCount[slotID].text = _troops[slotID].Count.ToString(); }