24 lines
499 B
C#
24 lines
499 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using TMPro;
|
|
using UnityEngine;
|
|
|
|
namespace Valheim
|
|
{
|
|
public class DamageUI : MonoBehaviour
|
|
{
|
|
public TextMeshProUGUI damageText;
|
|
|
|
|
|
public void ShowDamage(float damage, bool criticalHit, int size)
|
|
{
|
|
damageText.fontSize = size;
|
|
damageText.text = damage.ToString();
|
|
if (criticalHit)
|
|
{
|
|
damageText.color = Color.red;
|
|
}
|
|
}
|
|
}
|
|
}
|