void Start() { if (!UIMainControl.EnableHPOverlay()) { gameObject.SetActive(false); } }
public void _OnUnitDamaged(Unit unit) { if (!UIMainControl.EnableHPOverlay()) { return; } if (unitList.Contains(unit)) { return; } unitList.Add(unit); int index = GetUnusedUnitOverlayIndex(); unitOverlayList[index].SetUnit(unit); unitOverlayList[index].gameObject.SetActive(true); }