Initial import

This commit is contained in:
henriquenakashima 2020-09-17 22:52:50 -04:00
parent 71fb5e578f
commit 3cb9eb5031
69 changed files with 4197 additions and 0 deletions

View file

@ -0,0 +1,29 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class HeroInfoUI : MonoBehaviour
{
public GameObject target;
public BattleParticipant battleParticipant;
public Text nameText;
public Image healthBarBgImage;
public Image healthBarFgImage;
private Camera mainCamera;
// Start is called before the first frame update
void Start()
{
this.mainCamera = Camera.main;
this.nameText.text = this.battleParticipant.getDisplayName();
}
// Update is called once per frame
void Update()
{
Vector3 targetPos = this.mainCamera.WorldToScreenPoint(target.transform.position);
transform.position = targetPos;
}
}