2025-08-19 20:22:10 +08:00
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
namespace Prefab
|
|
|
|
{
|
2025-08-28 16:20:24 +08:00
|
|
|
public class ProgressBarPrefab : MonoBehaviour
|
2025-08-19 20:22:10 +08:00
|
|
|
{
|
|
|
|
public GameObject _progress;
|
|
|
|
public float Progress
|
|
|
|
{
|
|
|
|
get => _progress.transform.localScale.x;
|
|
|
|
set
|
|
|
|
{
|
2025-08-28 16:20:24 +08:00
|
|
|
var x = Mathf.Clamp01(value);
|
2025-08-19 20:22:10 +08:00
|
|
|
_progress.transform.localScale = new Vector3(x, _progress.transform.localScale.y, _progress.transform.localScale.z);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|