Remove UI from dead battle participants
This commit is contained in:
parent
6ac237449c
commit
d48780d629
3 changed files with 96 additions and 1 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue