rawrrr i'm so scarygit add .
This commit is contained in:
parent
5dcbd3c313
commit
b964c9b617
5 changed files with 433 additions and 6 deletions
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using Core.Extensions;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
||||
public class Marisa : Entity
|
||||
|
|
@ -11,6 +12,7 @@ public class Marisa : Entity
|
|||
public Transform firingPoint;
|
||||
[Header("UI")]
|
||||
[SerializeField] private Transform hpBarUI;
|
||||
[SerializeField] private TextMeshProUGUI healthText;
|
||||
private void Update()
|
||||
{
|
||||
mouseWorldPos = cam.ScreenToWorldPoint(Input.mousePosition);
|
||||
|
|
@ -32,5 +34,6 @@ public class Marisa : Entity
|
|||
private void UpdateHealthUI()
|
||||
{
|
||||
hpBarUI.localScale = new Vector3(Math.Clamp(health/maxHealth,0,maxHealth), 1,1);
|
||||
healthText.text = $"{health}/{maxHealth}";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue