using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using TMPro;
public class PlayerUI : MonoBehaviour
{
public Player player;
public Slider healthSlider;
void Update()
{
// Обновляем значение здоровья игрока
healthSlider.maxValue = player.maxHealth;
healthSlider.value = player.health;
}
}