Remove UI from dead battle participants

This commit is contained in:
henriquenakashima 2020-09-26 18:33:00 -04:00
parent 6ac237449c
commit d48780d629
3 changed files with 96 additions and 1 deletions

View file

@ -41,6 +41,10 @@ public class HeroInfoUI : MonoBehaviour
// Update is called once per frame
void Update()
{
if (!battleParticipant.IsAlive()) {
this.gameObject.SetActive(false);
}
Vector3 targetPos = this.mainCamera.WorldToScreenPoint(target.transform.position);
transform.position = targetPos;