Files
Gen_Hack-and-Slash-Roguelite/Client/Assets/Scripts/Prefab/ProgressBarPrefab.cs

18 lines
462 B
C#
Raw Normal View History

using UnityEngine;
namespace Prefab
{
public class ProgressBarPrefab:MonoBehaviour
{
public GameObject _progress;
public float Progress
{
get => _progress.transform.localScale.x;
set
{
var x=Mathf.Clamp01(value);
_progress.transform.localScale = new Vector3(x, _progress.transform.localScale.y, _progress.transform.localScale.z);
}
}
}
}